linux/drivers/watchdog/at32ap700x_wdt.c
<<
.2" /spatio /formio a .2" href="../linux+v3.7.9/drivers/watchdog/at32ap700x_wdt.c">.2" img src="../.static/gfx/right.png" alt=">>">.2 /spatio.2 spat class="lxr_search">.2" .2" input typaluhidden" namalunavtarget" on valu">.2" input typalutext" namalusearch" idlusearch">.2" buttptitypalusubmit">Search.2" Prefso /a>.2 /spatio" /divio" form ac/opt="ajax+*" method="post" onsubmit="return false;">.2 input typaluhidden" namaluajax_lookup" idluajax_lookup" on valu">." /formio." div class="headingbottpm">o div idlufile_contents"i
   1
/a>
spat class="comment">/*
/spatio   2
/a>
spat class="comment"> * Watchdog driver for Atmel AT32AP700X devices
/spatio   3
/a>
spat class="comment"> *
/spatio   4
/a>
spat class="comment"> * Copyright (C) 2005-2006 Atmel Corpora/opt
/spatio   5
/a>
spat class="comment"> *
/spatio   6
/a>
spat class="comment"> * This program is free software; you cat redistribute it and/or modify
/spatio   7
/a>
spat class="comment"> * it under the terms of the GNU General Public License versopti2 as
/spatio   8
/a>
spat class="comment"> * published by the Free Software Founda/opt.
/spatio   9
/a>
spat class="comment"> *
/spatio  .11
spat class="comment"> *
/spatio  11
/a>
spat class="comment"> * Erra/a: WDT Clear is blocked after WDT Reset
/spatio  12
/a>
spat class="comment"> *
/spatio  13
/a>
spat class="comment"> * A watchdog timer event will, after reset, block writes to the WDT_CLEAR
/spatio  14
/a>
spat class="comment"> * register, preventing the program to clear the next Watchdog Timer Reset.
/spatio  15
/a>
spat class="comment"> *
/spatio  16
/a>
spat class="comment"> * If you still want to use the WDT after a WDT reset a small code cat be
/spatio  17
/a>
spat class="comment"> * insterted at the startup checking the AVR32_PM.rcause register for WDT reset
/spatio  18
/a>
spat class="comment"> * and use a GPIO pin to reset the system. This method requires that one of the
/spatio  19
/a>
spat class="comment"> * GPIO pins are available and connected externally to the RESET_N pin. After
/spatio  211
spat class="comment"> * the GPIO pin has pulled down the reset line the GPIO will be reset and leave
/spatio  21
/a>
spat class="comment"> * the pin tristated with pullup.
/spatio  22
/a>
spat class="comment"> */
/spatio  23
/a>o  24
/a>#include <linux/init.h
/a>>o  25
/a>#include <linux/kernel.h
/a>>o  26
/a>#include <linux/module.h
/a>>o  27
/a>#include <linux/moduleparam.h
/a>>o  28
/a>#include <linux/miscdevice.h
/a>>o  29
/a>#include <linux/fs.h
/a>>o  30
/a>#include <linux/platform_device.h
/a>>o  31
/a>#include <linux/watchdog.h
/a>>o  32
/a>#include <linux/uaccess.h
/a>>o  33
/a>#include <linux/io.h
/a>>o  34
/a>#include <linux/spinlock.h
/a>>o  35
/a>#include <linux/slab.h
/a>>o  36
/a>o  37
/a>#define 
a href="+code=TIMEOUT_MIN" class="sref">TIMEOUT_MIN
/a>             1o  38
/a>#define 
a href="+code=TIMEOUT_MAX" class="sref">TIMEOUT_MAX
/a>             2o  39
/a>#define 
a href="+code=TIMEOUT_DEFAULT" class="sref">TIMEOUT_DEFAULT
/a>         
a href="+code=TIMEOUT_MAX" class="sref">TIMEOUT_MAX
/a>o  40
/a>o  41
/a>
spat class="comment">/* module parameters */
/spatio  42
/a>static int 
a href="+code=timeout" class="sref">timeout
/a> =  
a href="+code=TIMEOUT_DEFAULT" class="sref">TIMEOUT_DEFAULT
/a>;o  43
/a>
a href="+code=module_param" class="sref">module_param
/a>(
a href="+code=timeout" class="sref">timeout
/a>, int, 0);o  44
/a>
a href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESC
/a>(
a href="+code=timeout" class="sref">timeout
/a>,o  45
/a>                
spat class="string">"Timeout on va. Limited to be 1 or 2 seconds. (default="
/spatio  46
/a>                
a href="+code=__MODULE_STRING" class="sref">__MODULE_STRING
/a>(
a href="+code=TIMEOUT_DEFAULT" class="sref">TIMEOUT_DEFAULT
/a>) 
spat class="string">")"
/spati);o  47
/a>o  48
/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>;o  49
/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);o  50
/a>
a href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESC
/a>(
a href="+code=nowayout" class="sref">nowayout
/a>, 
spat class="string">"Watchdog cannot be stopped once started (default="
/spatio  51
/a>                
a href="+code=__MODULE_STRING" class="sref">__MODULE_STRING
/a>(
a href="+code=WATCHDOG_NOWAYOUT" class="sref">WATCHDOG_NOWAYOUT
/a>) 
spat class="string">")"
/spati);o  52
/a>o  53
/a>
spat class="comment">/* Watchdog registers and write/read macro */
/spatio  54
/a>#define 
a href="+code=WDT_CTRL" class="sref">WDT_CTRL
/a>                0x00o  55
/a>#define 
a href="+code=WDT_CTRL_EN" class="sref">WDT_CTRL_EN
/a>                0o  56
/a>#define 
a href="+code=WDT_CTRL_PSEL" class="sref">WDT_CTRL_PSEL
/a>              8o  57
/a>#define 
a href="+code=WDT_CTRL_KEY" class="sref">WDT_CTRL_KEY
/a>              24o  58
/a>o  59
/a>#define 
a href="+code=WDT_CLR" class="sref">WDT_CLR
/a>                 0x04o  60
/a>o  61
/a>#define 
a href="+code=WDT_RCAUSE" class="sref">WDT_RCAUSE
/a>              0x10o  62
/a>#define 
a href="+code=WDT_RCAUSE_POR" class="sref">WDT_RCAUSE_POR
/a>             0o  63
/a>#define 
a href="+code=WDT_RCAUSE_EXT" class="sref">WDT_RCAUSE_EXT
/a>             2o  64
/a>#define 
a href="+code=WDT_RCAUSE_WDT" class="sref">WDT_RCAUSE_WDT
/a>             3o  65
/a>#define 
a href="+code=WDT_RCAUSE_JTAG" class="sref">WDT_RCAUSE_JTAG
/a>            4o  66
/a>#define 
a href="+code=WDT_RCAUSE_SERP" class="sref">WDT_RCAUSE_SERP
/a>            5o  67
/a>o  68
/a>#define 
a href="+code=WDT_BIT" class="sref">WDT_BIT
/a>(
a href="+code=nama" class="sref">nama
/a>)           (1 << 
a href="+code=WDT_" class="sref">WDT_
/a>##nama)o  69
/a>#define 
a href="+code=WDT_BF" class="sref">WDT_BF
/a>(
a href="+code=nama" class="sref">nama
/a>, 
a href="+code=on va" class="sref">on va
/a>)     ((
a href="+code=on va" class="sref">on va
/a>) << 
a href="+code=WDT_" class="sref">WDT_
/a>##nama)o  70
/a>o  71
/a>#define 
a href="+code=wdt_readl" class="sref">wdt_readl
/a>(
a href="+code=dev" class="sref">dev
/a>, 
a href="+code=reg" class="sref">reg
/a>)                             \o  72
/a>        
a href="+code=__raw_readl" class="sref">__raw_readl
/a>((
a href="+code=dev" class="sref">dev
/a>)->
a href="+code=regs" class="sref">regs
/a> + 
a href="+code=WDT_" class="sref">WDT_
/a>##reg)o  73
/a>#define 
a href="+code=wdt_writel" class="sref">wdt_writel
/a>(
a href="+code=dev" class="sref">dev
/a>, 
a href="+code=reg" class="sref">reg
/a>, 
a href="+code=on va" class="sref">on va
/a>)                     \o  74
/a>        
a href="+code=__raw_writel" class="sref">__raw_writel
/a>((
a href="+code=on va" class="sref">on va
/a>), (
a href="+code=dev" class="sref">dev
/a>)->
a href="+code=regs" class="sref">regs
/a> + 
a href="+code=WDT_" class="sref">WDT_
/a>##reg)o  75
/a>o  76
/a>struct 
a href="+code=wdt_at32ap700x" class="sref">wdt_at32ap700x
/a> {o  77
/a>        void 
a href="+code=__iomem" class="sref">__iomem
/a>            *
a href="+code=regs" class="sref">regs
/a>;o  78
/a>        
a href="+code=spinlock_t" class="sref">spinlock_t
/a>              
a href="+code=io_lock" class="sref">io_lock
/a>;o  79
/a>        int                     
a href="+code=timeout" class="sref">timeout
/a>;o  80
/a>        int                     
a href="+code=boot_status" class="sref">boot_status
/a>;o  81
/a>        unsigned long           
a href="+code=users" class="sref">users
/a>;o  82
/a>        struct 
a href="+code=miscdevice" class="sref">miscdevice
/a>       
a href="+code=miscdev" class="sref">miscdev
/a>;o  83
/a>};o  84
/a>o  85
/a>static struct 
a href="+code=wdt_at32ap700x" class="sref">wdt_at32ap700x
/a> *
a href="+code=wdt" class="sref">wdt
/a>;o  86
/a>static char 
a href="+code=expect_release" class="sref">expect_release
/a>;o  87
/a>o  88
/a>
spat class="comment">/*
/spatio  89
/a>
spat class="comment"> * Disable the watchdog.
/spatio  911
spat class="comment"> */
/spatio  91
/a>static 
a href="+code=inline" class="sref">inline
/a> void 
a href="+code=at32_wdt_stop" class="sref">at32_wdt_stop
/a>(void)o  92
/a>{o  93
/a>        unsigned long 
a href="+code=psel" class="sref">psel
/a>;o  94
/a>o  95
/a>        
a href="+code=spin_lock" class="sref">spin_lock
/a>(&
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=io_lock" class="sref">io_lock
/a>);o  96
/a>        
a href="+code=psel" class="sref">psel
/a> = 
a href="+code=wdt_readl" class="sref">wdt_readl
/a>(
a href="+code=wdt" class="sref">wdt
/a>, 
a href="+code=CTRL" class="sref">CTRL
/a>) & 
a href="+code=WDT_BF" class="sref">WDT_BF
/a>(
a href="+code=CTRL_PSEL" class="sref">CTRL_PSEL
/a>, 0x0f);o  97
/a>        
a href="+code=wdt_writel" class="sref">wdt_writel
/a>(
a href="+code=wdt" class="sref">wdt
/a>, 
a href="+code=CTRL" class="sref">CTRL
/a>, 
a href="+code=psel" class="sref">psel
/a> | 
a href="+code=WDT_BF" class="sref">WDT_BF
/a>(
a href="+code=CTRL_KEY" class="sref">CTRL_KEY
/a>, 0x55));o  98
/a>        
a href="+code=wdt_writel" class="sref">wdt_writel
/a>(
a href="+code=wdt" class="sref">wdt
/a>, 
a href="+code=CTRL" class="sref">CTRL
/a>, 
a href="+code=psel" class="sref">psel
/a> | 
a href="+code=WDT_BF" class="sref">WDT_BF
/a>(
a href="+code=CTRL_KEY" class="sref">CTRL_KEY
/a>, 0xaa));o  99
/a>        
a href="+code=spin_unlock" class="sref">spin_unlock
/a>(&
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=io_lock" class="sref">io_lock
/a>);o 100
/a>}o 101
/a>o 102
/a>
spat class="comment">/*
/spatio 103
/a>
spat class="comment"> * Enable and reset the watchdog.
/spatio 104
/a>
spat class="comment"> */
/spatio 105
/a>static 
a href="+code=inline" class="sref">inline
/a> void 
a href="+code=at32_wdt_start" class="sref">at32_wdt_start
/a>(void)o 106
/a>{o 107
/a>        
spat class="comment">/* 0xf is 2^16 divider = 2 sec, 0xe is 2^15 divider = 1 sec */
/spatio 108
/a>        unsigned long 
a href="+code=psel" class="sref">psel
/a> = (
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=timeout" class="sref">timeout
/a> > 1) ? 0xf : 0xe;o 109
/a>o 110
/a>        
a href="+code=spin_lock" class="sref">spin_lock
/a>(&
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=io_lock" class="sref">io_lock
/a>);o 111
/a>        
a href="+code=wdt_writel" class="sref">wdt_writel
/a>(
a href="+code=wdt" class="sref">wdt
/a>, 
a href="+code=CTRL" class="sref">CTRL
/a>, 
a href="+code=WDT_BIT" class="sref">WDT_BIT
/a>(
a href="+code=CTRL_EN" class="sref">CTRL_EN
/a>)o 112
/a>                        | 
a href="+code=WDT_BF" class="sref">WDT_BF
/a>(
a href="+code=CTRL_PSEL" class="sref">CTRL_PSEL
/a>, 
a href="+code=psel" class="sref">psel
/a>)o 113
/a>                        | 
a href="+code=WDT_BF" class="sref">WDT_BF
/a>(
a href="+code=CTRL_KEY" class="sref">CTRL_KEY
/a>, 0x55));o 114
/a>        
a href="+code=wdt_writel" class="sref">wdt_writel
/a>(
a href="+code=wdt" class="sref">wdt
/a>, 
a href="+code=CTRL" class="sref">CTRL
/a>, 
a href="+code=WDT_BIT" class="sref">WDT_BIT
/a>(
a href="+code=CTRL_EN" class="sref">CTRL_EN
/a>)o 115
/a>                        | 
a href="+code=WDT_BF" class="sref">WDT_BF
/a>(
a href="+code=CTRL_PSEL" class="sref">CTRL_PSEL
/a>, 
a href="+code=psel" class="sref">psel
/a>)o 116
/a>                        | 
a href="+code=WDT_BF" class="sref">WDT_BF
/a>(
a href="+code=CTRL_KEY" class="sref">CTRL_KEY
/a>, 0xaa));o 117
/a>        
a href="+code=spin_unlock" class="sref">spin_unlock
/a>(&
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=io_lock" class="sref">io_lock
/a>);o 118
/a>}o 119
/a>o 1211
spat class="comment">/*
/spatio 121
/a>
spat class="comment"> * Pat the watchdog timer.
/spatio 122
/a>
spat class="comment"> */
/spatio 123
/a>static 
a href="+code=inline" class="sref">inline
/a> void 
a href="+code=at32_wdt_pat" class="sref">at32_wdt_pat
/a>(void)o 124
/a>{o 125
/a>        
a href="+code=spin_lock" class="sref">spin_lock
/a>(&
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=io_lock" class="sref">io_lock
/a>);o 126
/a>        
a href="+code=wdt_writel" class="sref">wdt_writel
/a>(
a href="+code=wdt" class="sref">wdt
/a>, 
a href="+code=CLR" class="sref">CLR
/a>, 0x42);o 127
/a>        
a href="+code=spin_unlock" class="sref">spin_unlock
/a>(&
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=io_lock" class="sref">io_lock
/a>);o 128
/a>}o 129
/a>o 1311
spat class="comment">/*
/spatio 131
/a>
spat class="comment"> * Watchdog device is opened, and watchdog starts running.
/spatio 132
/a>
spat class="comment"> */
/spatio 133
/a>static int 
a href="+code=at32_wdt_open" class="sref">at32_wdt_open
/a>(struct 
a href="+code=inode" class="sref">inode
/a> *
a href="+code=inode" class="sref">inode
/a>, struct 
a href="+code=file" class="sref">file
/a> *
a href="+code=file" class="sref">file
/a>)o 134
/a>{o 135
/a>        if (
a href="+code=test_and_set_bit" class="sref">test_and_set_bit
/a>(1, &
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=users" class="sref">users
/a>))o 136
/a>                return -
a href="+code=EBUSY" class="sref">EBUSY
/a>;o 137
/a>o 138
/a>        
a href="+code=at32_wdt_start" class="sref">at32_wdt_start
/a>();o 139
/a>        return 
a href="+code=nonseekable_open" class="sref">nonseekable_open
/a>(
a href="+code=inode" class="sref">inode
/a>, 
a href="+code=file" class="sref">file
/a>);o 140
/a>}o 141
/a>o 142
/a>
spat class="comment">/*
/spatio 143
/a>
spat class="comment"> * Close the watchdog device.
/spatio 144
/a>
spat class="comment"> */
/spatio 145
/a>static int 
a href="+code=at32_wdt_close" class="sref">at32_wdt_close
/a>(struct 
a href="+code=inode" class="sref">inode
/a> *
a href="+code=inode" class="sref">inode
/a>, struct 
a href="+code=file" class="sref">file
/a> *
a href="+code=file" class="sref">file
/a>)o 146
/a>{o 147
/a>        if (
a href="+code=expect_release" class="sref">expect_release
/a> == 42) {o 148
/a>                
a href="+code=at32_wdt_stop" class="sref">at32_wdt_stop
/a>();o 149
/a>        } else {o 150
/a>                
a href="+code=dev_dbg" class="sref">dev_dbg
/a>(
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=miscdev" class="sref">miscdev
/a>.
a href="+code=parent" class="sref">parent
/a>,o 151
/a>                        
spat class="string">"unexpected close, not stopping watchdog!\n"
/spati);o 152
/a>                
a href="+code=at32_wdt_pat" class="sref">at32_wdt_pat
/a>();o 153
/a>        }o 154
/a>        
a href="+code=clear_bit" class="sref">clear_bit
/a>(1, &
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=users" class="sref">users
/a>);o 155
/a>        
a href="+code=expect_release" class="sref">expect_release
/a> = 0;o 156
/a>        return 0;o 157
/a>}o 158
/a>o 159
/a>
spat class="comment">/*
/spatio 1611
spat class="comment"> * Change the watchdog time interval.
/spatio 161
/a>
spat class="comment"> */
/spatio 162
/a>static int 
a href="+code=at32_wdt_settimeout" class="sref">at32_wdt_settimeout
/a>(int 
a href="+code=time" class="sref">time
/a>)o 163
/a>{o 164
/a>        
spat class="comment">/*
/spatio 165
/a>
spat class="comment">         * All counting occurs at 1 / SLOW_CLOCK (32 kHz) and max prescaler is
/spatio 166
/a>
spat class="comment">         * 2 ^ 16 allowing up to 2 seconds timeout.
/spatio 167
/a>
spat class="comment">         */
/spatio 168
/a>        if ((
a href="+code=time" class="sref">time
/a> < 
a href="+code=TIMEOUT_MIN" class="sref">TIMEOUT_MIN
/a>) || (
a href="+code=time" class="sref">time
/a> > 
a href="+code=TIMEOUT_MAX" class="sref">TIMEOUT_MAX
/a>))o 169
/a>                return -
a href="+code=EINVAL" class="sref">EINVAL
/a>;o 170
/a>o 171
/a>        
spat class="comment">/*
/spatio 172
/a>
spat class="comment">         * Set new watchdog time. It will be used when at32_wdt_start() is
/spatio 173
/a>
spat class="comment">         * called.
/spatio 174
/a>
spat class="comment">         */
/spatio 175
/a>        
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=timeout" class="sref">timeout
/a> = 
a href="+code=time" class="sref">time
/a>;o 176
/a>        return 0;o 177
/a>}o 178
/a>o 179
/a>
spat class="comment">/*
/spatio 1811
spat class="comment"> * Get the watchdog status.
/spatio 181
/a>
spat class="comment"> */
/spatio 182
/a>static int 
a href="+code=at32_wdt_get_status" class="sref">at32_wdt_get_status
/a>(void)o 183
/a>{o 184
/a>        int 
a href="+code=rcause" class="sref">rcause
/a>;o 185
/a>        int 
a href="+code=status" class="sref">status
/a> = 0;o 186
/a>o 187
/a>        
a href="+code=rcause" class="sref">rcause
/a> = 
a href="+code=wdt_readl" class="sref">wdt_readl
/a>(
a href="+code=wdt" class="sref">wdt
/a>, 
a href="+code=RCAUSE" class="sref">RCAUSE
/a>);o 188
/a>o 189
/a>        switch (
a href="+code=rcause" class="sref">rcause
/a>) {o 190
/a>        case 
a href="+code=WDT_BIT" class="sref">WDT_BIT
/a>(
a href="+code=RCAUSE_EXT" class="sref">RCAUSE_EXT
/a>):o 191
/a>                
a href="+code=status" class="sref">status
/a> = 
a href="+code=WDIOF_EXTERN1" class="sref">WDIOF_EXTERN1
/a>;o 192
/a>                break;o 193
/a>        case 
a href="+code=WDT_BIT" class="sref">WDT_BIT
/a>(
a href="+code=RCAUSE_WDT" class="sref">RCAUSE_WDT
/a>):o 194
/a>                
a href="+code=status" class="sref">status
/a> = 
a href="+code=WDIOF_CARDRESET" class="sref">WDIOF_CARDRESET
/a>;o 195
/a>                break;o 196
/a>        case 
a href="+code=WDT_BIT" class="sref">WDT_BIT
/a>(
a href="+code=RCAUSE_POR" class="sref">RCAUSE_POR
/a>):  
spat class="comment">/* fall through */
/spatio 197
/a>        case 
a href="+code=WDT_BIT" class="sref">WDT_BIT
/a>(
a href="+code=RCAUSE_JTAG" class="sref">RCAUSE_JTAG
/a>): 
spat class="comment">/* fall through */
/spatio 198
/a>        case 
a href="+code=WDT_BIT" class="sref">WDT_BIT
/a>(
a href="+code=RCAUSE_SERP" class="sref">RCAUSE_SERP
/a>): 
spat class="comment">/* fall through */
/spatio 199
/a>        default:o 200
/a>                break;o 201
/a>        }o 202
/a>o 203
/a>        return 
a href="+code=status" class="sref">status
/a>;o 204
/a>}o 205
/a>o 206
/a>static const struct 
a href="+code=watchdog_info" class="sref">watchdog_info
/a> 
a href="+code=at32_wdt_info" class="sref">at32_wdt_info
/a> = {o 207
/a>        .
a href="+code=identity" class="sref">identity
/a>       = 
spat class="string">"at32ap700x watchdog"
/spati,o 208
/a>        .
a href="+code=options" class="sref">options
/a>        = 
a href="+code=WDIOF_SETTIMEOUT" class="sref">WDIOF_SETTIMEOUT
/a> |o 209
/a>                          
a href="+code=WDIOF_KEEPALIVEPING" class="sref">WDIOF_KEEPALIVEPING
/a> |o 210
/a>                          
a href="+code=WDIOF_MAGICCLOSE" class="sref">WDIOF_MAGICCLOSE
/a>,o 211
/a>};o 212
/a>o 213
/a>
spat class="comment">/*
/spatio 214
/a>
spat class="comment"> * Handle commands from user-space.
/spatio 215
/a>
spat class="comment"> */
/spatio 216
/a>static long 
a href="+code=at32_wdt_ioctl" class="sref">at32_wdt_ioctl
/a>(struct 
a href="+code=file" class="sref">file
/a> *
a href="+code=file" class="sref">file
/a>,o 217
/a>                                unsigned int 
a href="+code=cmd" class="sref">cmd
/a>, unsigned long 
a href="+code=arg" class="sref">arg
/a>)o 218
/a>{o 219
/a>        int 
a href="+code=ret" class="sref">ret
/a> = -
a href="+code=ENOTTY" class="sref">ENOTTY
/a>;o 220
/a>        int 
a href="+code=time" class="sref">time
/a>;o 221
/a>        void 
a href="+code=__user" class="sref">__user
/a> *
a href="+code=argp" class="sref">argp
/a> = (void 
a href="+code=__user" class="sref">__user
/a> *)
a href="+code=arg" class="sref">arg
/a>;o 222
/a>        int 
a href="+code=__user" class="sref">__user
/a> *
a href="+code=p" class="sref">p
/a> = 
a href="+code=argp" class="sref">argp
/a>;o 223
/a>o 224
/a>        switch (
a href="+code=cmd" class="sref">cmd
/a>) {o 225
/a>        case 
a href="+code=WDIOC_GETSUPPORT" class="sref">WDIOC_GETSUPPORT
/a>:o 226
/a>                
a href="+code=ret" class="sref">ret
/a> = 
a href="+code=copy_to_user" class="sref">copy_to_user
/a>(
a href="+code=argp" class="sref">argp
/a>, &
a href="+code=at32_wdt_info" class="sref">at32_wdt_info
/a>,o 227
/a>                                sizeof(
a href="+code=at32_wdt_info" class="sref">at32_wdt_info
/a>)) ? -
a href="+code=EFAULT" class="sref">EFAULT
/a> : 0;o 228
/a>                break;o 229
/a>        case 
a href="+code=WDIOC_GETSTATUS" class="sref">WDIOC_GETSTATUS
/a>:o 230
/a>                
a href="+code=ret" class="sref">ret
/a> = 
a href="+code=put_user" class="sref">put_user
/a>(0, 
a href="+code=p" class="sref">p
/a>);o 231
/a>                break;o 232
/a>        case 
a href="+code=WDIOC_GETBOOTSTATUS" class="sref">WDIOC_GETBOOTSTATUS
/a>:o 233
/a>                
a href="+code=ret" class="sref">ret
/a> = 
a href="+code=put_user" class="sref">put_user
/a>(
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=boot_status" class="sref">boot_status
/a>, 
a href="+code=p" class="sref">p
/a>);o 234
/a>                break;o 235
/a>        case 
a href="+code=WDIOC_SETOPTIONS" class="sref">WDIOC_SETOPTIONS
/a>:o 236
/a>                
a href="+code=ret" class="sref">ret
/a> = 
a href="+code=get_user" class="sref">get_user
/a>(
a href="+code=time" class="sref">time
/a>, 
a href="+code=p" class="sref">p
/a>);o 237
/a>                if (
a href="+code=ret" class="sref">ret
/a>)o 238
/a>                        break;o 239
/a>                if (
a href="+code=time" class="sref">time
/a> & 
a href="+code=WDIOS_DISABLECARD" class="sref">WDIOS_DISABLECARD
/a>)o 240
/a>                        
a href="+code=at32_wdt_stop" class="sref">at32_wdt_stop
/a>();o 241
/a>                if (
a href="+code=time" class="sref">time
/a> & 
a href="+code=WDIOS_ENABLECARD" class="sref">WDIOS_ENABLECARD
/a>)o 242
/a>                        
a href="+code=at32_wdt_start" class="sref">at32_wdt_start
/a>();o 243
/a>                
a href="+code=ret" class="sref">ret
/a> = 0;o 244
/a>                break;o 245
/a>        case 
a href="+code=WDIOC_KEEPALIVE" class="sref">WDIOC_KEEPALIVE
/a>:o 246
/a>                
a href="+code=at32_wdt_pat" class="sref">at32_wdt_pat
/a>();o 247
/a>                
a href="+code=ret" class="sref">ret
/a> = 0;o 248
/a>                break;o 249
/a>        case 
a href="+code=WDIOC_SETTIMEOUT" class="sref">WDIOC_SETTIMEOUT
/a>:o 250
/a>                
a href="+code=ret" class="sref">ret
/a> = 
a href="+code=get_user" class="sref">get_user
/a>(
a href="+code=time" class="sref">time
/a>, 
a href="+code=p" class="sref">p
/a>);o 251
/a>                if (
a href="+code=ret" class="sref">ret
/a>)o 252
/a>                        break;o 253
/a>                
a href="+code=ret" class="sref">ret
/a> = 
a href="+code=at32_wdt_settimeout" class="sref">at32_wdt_settimeout
/a>(
a href="+code=time" class="sref">time
/a>);o 254
/a>                if (
a href="+code=ret" class="sref">ret
/a>)o 255
/a>                        break;o 256
/a>                
spat class="comment">/* Enable new time on va */
/spatio 257
/a>                
a href="+code=at32_wdt_start" class="sref">at32_wdt_start
/a>();o 258
/a>                
spat class="comment">/* fall through */
/spatio 259
/a>        case 
a href="+code=WDIOC_GETTIMEOUT" class="sref">WDIOC_GETTIMEOUT
/a>:o 260
/a>                
a href="+code=ret" class="sref">ret
/a> = 
a href="+code=put_user" class="sref">put_user
/a>(
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=timeout" class="sref">timeout
/a>, 
a href="+code=p" class="sref">p
/a>);o 261
/a>                break;o 262
/a>        }o 263
/a>o 264
/a>        return 
a href="+code=ret" class="sref">ret
/a>;o 265
/a>}o 266
/a>o 267
/a>static 
a href="+code=ssize_t" class="sref">ssize_t
/a> 
a href="+code=at32_wdt_write" class="sref">at32_wdt_write
/a>(struct 
a href="+code=file" class="sref">file
/a> *
a href="+code=file" class="sref">file
/a>, const char 
a href="+code=__user" class="sref">__user
/a> *
a href="+code=data" class="sref">data
/a>,o 268
/a>                                
a href="+code=size_t" class="sref">size_t
/a> 
a href="+code=len" class="sref">len
/a>, 
a href="+code=loff_t" class="sref">loff_t
/a> *
a href="+code=ppos" class="sref">ppos
/a>)o 269
/a>{o 270
/a>        
spat class="comment">/* See if we got the magic character 'V' and reload the timer */
/spatio 271
/a>        if (
a href="+code=len" class="sref">len
/a>) {o 272
/a>                if (!
a href="+code=nowayout" class="sref">nowayout
/a>) {o 273
/a>                        
a href="+code=size_t" class="sref">size_t
/a> 
a href="+code=i" class="sref">i
/a>;o 274
/a>o 275
/a>                        
spat class="comment">/*
/spatio 276
/a>
spat class="comment">                         * note: just in case someone wrote the magic
/spatio 277
/a>
spat class="comment">                         * character five months ago...
/spatio 278
/a>
spat class="comment">                         */
/spatio 279
/a>                        
a href="+code=expect_release" class="sref">expect_release
/a> = 0;o 280
/a>o 281
/a>                        
spat class="comment">/*
/spatio 282
/a>
spat class="comment">                         * scat to see whether or not we got the magic
/spatio 283
/a>
spat class="comment">                         * character
/spatio 284
/a>
spat class="comment">                         */
/spatio 285
/a>                        for (
a href="+code=i" class="sref">i
/a> = 0; 
a href="+code=i" class="sref">i
/a> != 
a href="+code=len" class="sref">len
/a>; 
a href="+code=i" class="sref">i
/a>++) {o 286
/a>                                char 
a href="+code=c" class="sref">c
/a>;o 287
/a>                                if (
a href="+code=get_user" class="sref">get_user
/a>(
a href="+code=c" class="sref">c
/a>, 
a href="+code=data" class="sref">data
/a> + 
a href="+code=i" class="sref">i
/a>))o 288
/a>                                        return -
a href="+code=EFAULT" class="sref">EFAULT
/a>;o 289
/a>                                if (
a href="+code=c" class="sref">c
/a> == 
spat class="string">'V'
/spati)o 290
/a>                                        
a href="+code=expect_release" class="sref">expect_release
/a> = 42;o 291
/a>                        }o 292
/a>                }o 293
/a>                
spat class="comment">/* someone wrote to us, we should pat the watchdog */
/spatio 294
/a>                
a href="+code=at32_wdt_pat" class="sref">at32_wdt_pat
/a>();o 295
/a>        }o 296
/a>        return 
a href="+code=len" class="sref">len
/a>;o 297
/a>}o 298
/a>o 299
/a>static const struct 
a href="+code=file_operations" class="sref">file_operations
/a> 
a href="+code=at32_wdt_fops" class="sref">at32_wdt_fops
/a> = {o 300
/a>        .
a href="+code=owner" class="sref">owner
/a>          = 
a href="+code=THIS_MODULE" class="sref">THIS_MODULE
/a>,o 301
/a>        .
a href="+code=llseek" class="sref">llseek
/a>         = 
a href="+code=no_llseek" class="sref">no_llseek
/a>,o 302
/a>        .
a href="+code=unlocked_ioctl" class="sref">unlocked_ioctl
/a> = 
a href="+code=at32_wdt_ioctl" class="sref">at32_wdt_ioctl
/a>,o 303
/a>        .
a href="+code=open" class="sref">open
/a>           = 
a href="+code=at32_wdt_open" class="sref">at32_wdt_open
/a>,o 304
/a>        .
a href="+code=release" class="sref">release
/a>        = 
a href="+code=at32_wdt_close" class="sref">at32_wdt_close
/a>,o 305
/a>        .
a href="+code=write" class="sref">write
/a>          = 
a href="+code=at32_wdt_write" class="sref">at32_wdt_write
/a>,o 306
/a>};o 307
/a>o 308
/a>static int 
a href="+code=__init" class="sref">__init
/a> 
a href="+code=at32_wdt_probe" class="sref">at32_wdt_probe
/a>(struct 
a href="+code=platform_device" class="sref">platform_device
/a> *
a href="+code=pdev" class="sref">pdev
/a>)o 309
/a>{o 310
/a>        struct 
a href="+code=resource" class="sref">resource
/a> *
a href="+code=regs" class="sref">regs
/a>;o 311
/a>        int 
a href="+code=ret" class="sref">ret
/a>;o 312
/a>o 313
/a>        if (
a href="+code=wdt" class="sref">wdt
/a>) {o 314
/a>                
a href="+code=dev_dbg" class="sref">dev_dbg
/a>(&
a href="+code=pdev" class="sref">pdev
/a>->
a href="+code=dev" class="sref">dev
/a>, 
spat class="string">"only 1 wdt instance supported.\n"
/spati);o 315
/a>                return -
a href="+code=EBUSY" class="sref">EBUSY
/a>;o 316
/a>        }o 317
/a>o 318
/a>        
a href="+code=regs" class="sref">regs
/a> = 
a href="+code=platform_get_resource" class="sref">platform_get_resource
/a>(
a href="+code=pdev" class="sref">pdev
/a>, 
a href="+code=IORESOURCE_MEM" class="sref">IORESOURCE_MEM
/a>, 0);o 319
/a>        if (!
a href="+code=regs" class="sref">regs
/a>) {o 320
/a>                
a href="+code=dev_dbg" class="sref">dev_dbg
/a>(&
a href="+code=pdev" class="sref">pdev
/a>->
a href="+code=dev" class="sref">dev
/a>, 
spat class="string">"missing mmio resource\n"
/spati);o 321
/a>                return -
a href="+code=ENXIO" class="sref">ENXIO
/a>;o 322
/a>        }o 323
/a>o 324
/a>        
a href="+code=wdt" class="sref">wdt
/a> = 
a href="+code=kzalloc" class="sref">kzalloc
/a>(sizeof(struct 
a href="+code=wdt_at32ap700x" class="sref">wdt_at32ap700x
/a>), 
a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL
/a>);o 325
/a>        if (!
a href="+code=wdt" class="sref">wdt
/a>) {o 326
/a>                
a href="+code=dev_dbg" class="sref">dev_dbg
/a>(&
a href="+code=pdev" class="sref">pdev
/a>->
a href="+code=dev" class="sref">dev
/a>, 
spat class="string">"no memory for wdt structure\n"
/spati);o 327
/a>                return -
a href="+code=ENOMEM" class="sref">ENOMEM
/a>;o 328
/a>        }o 329
/a>o 330
/a>        
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=regs" class="sref">regs
/a> = 
a href="+code=ioremap" class="sref">ioremap
/a>(
a href="+code=regs" class="sref">regs
/a>->
a href="+code=start" class="sref">start
/a>, 
a href="+code=resource_size" class="sref">resource_size
/a>(
a href="+code=regs" class="sref">regs
/a>));o 331
/a>        if (!
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=regs" class="sref">regs
/a>) {o 332
/a>                
a href="+code=ret" class="sref">ret
/a> = -
a href="+code=ENOMEM" class="sref">ENOMEM
/a>;o 333
/a>                
a href="+code=dev_dbg" class="sref">dev_dbg
/a>(&
a href="+code=pdev" class="sref">pdev
/a>->
a href="+code=dev" class="sref">dev
/a>, 
spat class="string">"could not map I/O memory\n"
/spati);o 334
/a>                goto 
a href="+code=err_free" class="sref">err_free
/a>;o 335
/a>        }o 336
/a>o 337
/a>        
a href="+code=spin_lock_init" class="sref">spin_lock_init
/a>(&
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=io_lock" class="sref">io_lock
/a>);o 338
/a>        
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=boot_status" class="sref">boot_status
/a> = 
a href="+code=at32_wdt_get_status" class="sref">at32_wdt_get_status
/a>();o 339
/a>o 340
/a>        
spat class="comment">/* Work-around for watchdog silicon errata. */
/spatio 341
/a>        if (
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=boot_status" class="sref">boot_status
/a> & 
a href="+code=WDIOF_CARDRESET" class="sref">WDIOF_CARDRESET
/a>) {o 342
/a>                
a href="+code=dev_info" class="sref">dev_info
/a>(&
a href="+code=pdev" class="sref">pdev
/a>->
a href="+code=dev" class="sref">dev
/a>, 
spat class="string">"CPU must be reset with external "
/spatio 343
/a>                                
spat class="string">"reset or POR due to silicon errata.\n"
/spati);o 344
/a>                
a href="+code=ret" class="sref">ret
/a> = -
a href="+code=EIO" class="sref">EIO
/a>;o 345
/a>                goto 
a href="+code=err_iounmap" class="sref">err_iounmap
/a>;o 346
/a>        } else {o 347
/a>                
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=users" class="sref">users
/a> = 0;o 348
/a>        }o 349
/a>o 350
/a>        
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=miscdev" class="sref">miscdev
/a>.
a href="+code=minor" class="sref">minor
/a>      = 
a href="+code=WATCHDOG_MINOR" class="sref">WATCHDOG_MINOR
/a>;o 351
/a>        
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=miscdev" class="sref">miscdev
/a>.
a href="+code=nama" class="sref">name
/a>       = 
spat class="string">"watchdog"
/spati;o 352
/a>        
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=miscdev" class="sref">miscdev
/a>.
a href="+code=fops" class="sref">fops
/a>       = &
a href="+code=at32_wdt_fops" class="sref">at32_wdt_fops
/a>;o 353
/a>        
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=miscdev" class="sref">miscdev
/a>.
a href="+code=parent" class="sref">parent
/a>     = &
a href="+code=pdev" class="sref">pdev
/a>->
a href="+code=dev" class="sref">dev
/a>;o 354
/a>o 355
/a>        
a href="+code=platform_set_drvdata" class="sref">platform_set_drvdata
/a>(
a href="+code=pdev" class="sref">pdev
/a>, 
a href="+code=wdt" class="sref">wdt
/a>);o 356
/a>o 357
/a>        if (
a href="+code=at32_wdt_settimeout" class="sref">at32_wdt_settimeout
/a>(
a href="+code=timeout" class="sref">timeout
/a>)) {o 358
/a>                
a href="+code=at32_wdt_settimeout" class="sref">at32_wdt_settimeout
/a>(
a href="+code=TIMEOUT_DEFAULT" class="sref">TIMEOUT_DEFAULT
/a>);o 359
/a>                
a href="+code=dev_dbg" class="sref">dev_dbg
/a>(&
a href="+code=pdev" class="sref">pdev
/a>->
a href="+code=dev" class="sref">dev
/a>,o 360
/a>                        
spat class="string">"default timeout invalid, set to %d sec.\n"
/spati,o 361
/a>                        
a href="+code=TIMEOUT_DEFAULT" class="sref">TIMEOUT_DEFAULT
/a>);o 362
/a>        }o 363
/a>o 364
/a>        
a href="+code=ret" class="sref">ret
/a> = 
a href="+code=misc_register" class="sref">misc_register
/a>(&
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=miscdev" class="sref">miscdev
/a>);o 365
/a>        if (
a href="+code=ret" class="sref">ret
/a>) {o 366
/a>                
a href="+code=dev_dbg" class="sref">dev_dbg
/a>(&
a href="+code=pdev" class="sref">pdev
/a>->
a href="+code=dev" class="sref">dev
/a>, 
spat class="string">"failed to register wdt miscdev\n"
/spati);o 367
/a>                goto 
a href="+code=err_register" class="sref">err_register
/a>;o 368
/a>        }o 369
/a>o 370
/a>        
a href="+code=dev_info" class="sref">dev_info
/a>(&
a href="+code=pdev" class="sref">pdev
/a>->
a href="+code=dev" class="sref">dev
/a>,o 371
/a>                
spat class="string">"AT32AP700X WDT at 0x%p, timeout %d sec (nowayout=%d)\n"
/spati,o 372
/a>                
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=regs" class="sref">regs
/a>, 
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=timeout" class="sref">timeout
/a>, 
a href="+code=nowayout" class="sref">nowayout
/a>);o 373
/a>o 374
/a>        return 0;o 375
/a>o 376
/a>
a href="+code=err_register" class="sref">err_register
/a>:o 377
/a>        
a href="+code=platform_set_drvdata" class="sref">platform_set_drvdata
/a>(
a href="+code=pdev" class="sref">pdev
/a>, 
a href="+code=NULL" class="sref">NULL
/a>);o 378
/a>
a href="+code=err_iounmap" class="sref">err_iounmap
/a>:o 379
/a>        
a href="+code=iounmap" class="sref">iounmap
/a>(
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=regs" class="sref">regs
/a>);o 380
/a>
a href="+code=err_free" class="sref">err_free
/a>:o 381
/a>        
a href="+code=kfree" class="sref">kfree
/a>(
a href="+code=wdt" class="sref">wdt
/a>);o 382
/a>        
a href="+code=wdt" class="sref">wdt
/a> = 
a href="+code=NULL" class="sref">NULL
/a>;o 383
/a>        return 
a href="+code=ret" class="sref">ret
/a>;o 384
/a>}o 385
/a>o 386
/a>static int 
a href="+code=__exit" class="sref">__exit
/a> 
a href="+code=at32_wdt_remove" class="sref">at32_wdt_remove
/a>(struct 
a href="+code=platform_device" class="sref">platform_device
/a> *
a href="+code=pdev" class="sref">pdev
/a>)o 387
/a>{o 388
/a>        if (
a href="+code=wdt" class="sref">wdt
/a> && 
a href="+code=platform_get_drvdata" class="sref">platform_get_drvdata
/a>(
a href="+code=pdev" class="sref">pdev
/a>) == 
a href="+code=wdt" class="sref">wdt
/a>) {o 389
/a>                
spat class="comment">/* Stop the timer before we leava */
/spatio 390
/a>                if (!
a href="+code=nowayout" class="sref">nowayout
/a>)o 391
/a>                        
a href="+code=at32_wdt_stop" class="sref">at32_wdt_stop
/a>();o 392
/a>o 393
/a>                
a href="+code=misc_deregister" class="sref">misc_deregister
/a>(&
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=miscdev" class="sref">miscdev
/a>);o 394
/a>                
a href="+code=iounmap" class="sref">iounmap
/a>(
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=regs" class="sref">regs
/a>);o 395
/a>                
a href="+code=kfree" class="sref">kfree
/a>(
a href="+code=wdt" class="sref">wdt
/a>);o 396
/a>                
a href="+code=wdt" class="sref">wdt
/a> = 
a href="+code=NULL" class="sref">NULL
/a>;o 397
/a>                
a href="+code=platform_set_drvdata" class="sref">platform_set_drvdata
/a>(
a href="+code=pdev" class="sref">pdev
/a>, 
a href="+code=NULL" class="sref">NULL
/a>);o 398
/a>        }o 399
/a>        return 0;o 400
/a>}o 401
/a>o 402
/a>static void 
a href="+code=at32_wdt_shutdown" class="sref">at32_wdt_shutdown
/a>(struct 
a href="+code=platform_device" class="sref">platform_device
/a> *
a href="+code=pdev" class="sref">pdev
/a>)o 403
/a>{o 404
/a>        
a href="+code=at32_wdt_stop" class="sref">at32_wdt_stop
/a>();o 405
/a>}o 406
/a>o 407
/a>#ifdef 
a href="+code=CONFIG_PM" class="sref">CONFIG_PM
/a>o 408
/a>static int 
a href="+code=at32_wdt_suspend" class="sref">at32_wdt_suspend
/a>(struct 
a href="+code=platform_device" class="sref">platform_device
/a> *
a href="+code=pdev" class="sref">pdev
/a>, 
a href="+code=pm_message_t" class="sref">pm_message_t
/a> 
a href="+code=message" class="sref">message
/a>)o 409
/a>{o 410
/a>        
a href="+code=at32_wdt_stop" class="sref">at32_wdt_stop
/a>();o 411
/a>        return 0;o 412
/a>}o 413
/a>o 414
/a>static int 
a href="+code=at32_wdt_resuma" class="sref">at32_wdt_resuma
/a>(struct 
a href="+code=platform_device" class="sref">platform_device
/a> *
a href="+code=pdev" class="sref">pdev
/a>)o 415
/a>{o 416
/a>        if (
a href="+code=wdt" class="sref">wdt
/a>->
a href="+code=users" class="sref">users
/a>)o 417
/a>                
a href="+code=at32_wdt_start" class="sref">at32_wdt_start
/a>();o 418
/a>        return 0;o 419
/a>}o 420
/a>#elseo 421
/a>#define 
a href="+code=at32_wdt_suspend" class="sref">at32_wdt_suspend
/a> 
a href="+code=NULL" class="sref">NULL
/a>o 422
/a>#define 
a href="+code=at32_wdt_resuma" class="sref">at32_wdt_resuma
/a> 
a href="+code=NULL" class="sref">NULL
/a>o 423
/a>#endifo 424
/a>o 425
/a>
spat class="comment">/* work with hotplug and coldplug */
/spatio 426
/a>
a href="+code=MODULE_ALIAS" class="sref">MODULE_ALIAS
/a>(
spat class="string">"platform:at32_wdt"
/spati);o 427
/a>o 428
/a>static struct 
a href="+code=platform_driver" class="sref">platform_driver
/a> 
a href="+code=at32_wdt_driver" class="sref">at32_wdt_driver
/a> = {o 429
/a>        .
a href="+code=remove" class="sref">remove
/a>         = 
a href="+code=__exit_p" class="sref">__exit_p
/a>(
a href="+code=at32_wdt_remove" class="sref">at32_wdt_remove
/a>),o 430
/a>        .
a href="+code=suspend" class="sref">suspend
/a>        = 
a href="+code=at32_wdt_suspend" class="sref">at32_wdt_suspend
/a>,o 431
/a>        .
a href="+code=resuma" class="sref">resuma
/a>         = 
a href="+code=at32_wdt_resuma" class="sref">at32_wdt_resuma
/a>,o 432
/a>        .
a href="+code=driver" class="sref">driver
/a>         = {o 433
/a>                .
a href="+code=nama" class="sref">name
/a>   = 
spat class="string">"at32_wdt"
/spati,o 434
/a>                .
a href="+code=owner" class="sref">owner
/a>  = 
a href="+code=THIS_MODULE" class="sref">THIS_MODULE
/a>,o 435
/a>        },o 436
/a>        .
a href="+code=shutdown" class="sref">shutdown
/a>       = 
a href="+code=at32_wdt_shutdown" class="sref">at32_wdt_shutdown
/a>,o 437
/a>};o 438
/a>o 439
/a>static int 
a href="+code=__init" class="sref">__init
/a> 
a href="+code=at32_wdt_init" class="sref">at32_wdt_init
/a>(void)o 440
/a>{o 441
/a>        return 
a href="+code=platform_driver_probe" class="sref">platform_driver_probe
/a>(&
a href="+code=at32_wdt_driver" class="sref">at32_wdt_driver
/a>, 
a href="+code=at32_wdt_probe" class="sref">at32_wdt_probe
/a>);o 442
/a>}o 443
/a>
a href="+code=module_init" class="sref">module_init
/a>(
a href="+code=at32_wdt_init" class="sref">at32_wdt_init
/a>);o 444
/a>o 445
/a>static void 
a href="+code=__exit" class="sref">__exit
/a> 
a href="+code=at32_wdt_exit" class="sref">at32_wdt_exit
/a>(void)o 446
/a>{o 447
/a>        
a href="+code=platform_driver_unregister" class="sref">platform_driver_unregister
/a>(&
a href="+code=at32_wdt_driver" class="sref">at32_wdt_driver
/a>);o 448
/a>}o 449
/a>
a href="+code=module_exit" class="sref">module_exit
/a>(
a href="+code=at32_wdt_exit" class="sref">at32_wdt_exit
/a>);o 450
/a>o 451
/a>
a href="+code=MODULE_AUTHOR" class="sref">MODULE_AUTHOR
/a>(
spat class="string">"Hans-Christiat Egtvedt <egtvedt@samfundet.no>"
/spati);o 452
/a>
a href="+code=MODULE_DESCRIPTION" class="sref">MODULE_DESCRIPTION
/a>(
spat class="string">"Watchdog driver for Atmel AT32AP700X"
/spati);o 453
/a>
a href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSE
/a>(
spat class="string">"GPL"
/spati);o 454
/a>
a href="+code=MODULE_ALIAS_MISCDEV" class="sref">MODULE_ALIAS_MISCDEV
/a>(
a href="+code=WATCHDOG_MINOR" class="sref">WATCHDOG_MINOR
/a>);o 455
/a>
lxr.linux.no kindly hosted by Redpill Linpro AS /a>, provider of Linux consulting and operations services since 1995.