Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c1a67643
Commit
c1a67643
authored
Jan 10, 2003
by
Dave Jones
Committed by
Dave Jones
Jan 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WATCHDOG] More alim7101 cleanups
parent
04315f20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
drivers/char/watchdog/alim7101_wdt.c
drivers/char/watchdog/alim7101_wdt.c
+15
-14
No files found.
drivers/char/watchdog/alim7101_wdt.c
View file @
c1a67643
...
...
@@ -258,7 +258,9 @@ static struct miscdevice wdt_miscdev = {
static
int
wdt_notify_sys
(
struct
notifier_block
*
this
,
unsigned
long
code
,
void
*
unused
)
{
if
(
code
==
SYS_DOWN
||
code
==
SYS_HALT
)
wdt_turnoff
();
if
(
code
==
SYS_DOWN
||
code
==
SYS_HALT
)
wdt_turnoff
();
if
(
code
==
SYS_RESTART
)
{
/*
* Cobalt devices have no way of rebooting themselves other than
...
...
@@ -267,7 +269,7 @@ static int wdt_notify_sys(struct notifier_block *this, unsigned long code, void
*/
wdt_change
(
WDT_ENABLE
);
printk
(
OUR_NAME
": Watchdog timer is now enabled with no heartbeat - should reboot in ~1 second.
\n
"
);
}
;
}
return
NOTIFY_DONE
;
}
...
...
@@ -278,9 +280,9 @@ static int wdt_notify_sys(struct notifier_block *this, unsigned long code, void
static
struct
notifier_block
wdt_notifier
=
{
wdt_notify_sys
,
0
,
0
.
notifier_call
=
wdt_notify_sys
,
.
next
=
0
,
.
priority
=
0
};
static
void
__exit
alim7101_wdt_unload
(
void
)
...
...
@@ -302,7 +304,7 @@ static int __init alim7101_wdt_init(void)
if
(
!
alim7101_pmu
)
{
printk
(
KERN_INFO
OUR_NAME
": ALi M7101 PMU not present - WDT not set
\n
"
);
return
-
EBUSY
;
}
;
}
/* Set the WDT in the PMU to 1 second */
pci_write_config_byte
(
alim7101_pmu
,
ALI_7101_WDT
,
0x02
);
...
...
@@ -311,12 +313,12 @@ static int __init alim7101_wdt_init(void)
if
(
!
ali1543_south
)
{
printk
(
KERN_INFO
OUR_NAME
": ALi 1543 South-Bridge not present - WDT not set
\n
"
);
return
-
EBUSY
;
}
;
}
pci_read_config_byte
(
ali1543_south
,
0x5e
,
&
tmp
);
if
((
tmp
&
0x1e
)
!=
0x12
)
{
printk
(
KERN_INFO
OUR_NAME
": ALi 1543 South-Bridge does not have the correct revision number (???1001?) - WDT not set
\n
"
);
return
-
EBUSY
;
}
;
}
init_timer
(
&
timer
);
timer
.
function
=
wdt_timer_ping
;
...
...
@@ -330,7 +332,7 @@ static int __init alim7101_wdt_init(void)
if
(
rc
)
{
misc_deregister
(
&
wdt_miscdev
);
return
rc
;
}
;
}
printk
(
KERN_INFO
OUR_NAME
": WDT driver for ALi M7101 initialised.
\n
"
);
return
0
;
...
...
@@ -339,6 +341,5 @@ static int __init alim7101_wdt_init(void)
module_init
(
alim7101_wdt_init
);
module_exit
(
alim7101_wdt_unload
);
EXPORT_NO_SYMBOLS
;
MODULE_AUTHOR
(
"Steve Hill"
);
MODULE_LICENSE
(
"GPL"
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment