Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
cc15d80c
Commit
cc15d80c
authored
Feb 05, 2009
by
Kevin Hilman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "watchdog: davinci: convert to ioremap() + io[read|write]"
This reverts commit
b15b0df2
.
parent
83824d0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
19 deletions
+13
-19
drivers/watchdog/davinci_wdt.c
drivers/watchdog/davinci_wdt.c
+13
-19
No files found.
drivers/watchdog/davinci_wdt.c
View file @
cc15d80c
...
...
@@ -75,9 +75,9 @@ static void wdt_service(void)
spin_lock
(
&
io_lock
);
/* put watchdog in service state */
iowrite32
(
WDKEY_SEQ0
,
wdt_base
+
WDTCR
);
davinci_writel
(
WDKEY_SEQ0
,
wdt_base
+
WDTCR
);
/* put watchdog in active state */
iowrite32
(
WDKEY_SEQ1
,
wdt_base
+
WDTCR
);
davinci_writel
(
WDKEY_SEQ1
,
wdt_base
+
WDTCR
);
spin_unlock
(
&
io_lock
);
}
...
...
@@ -90,29 +90,29 @@ static void wdt_enable(void)
spin_lock
(
&
io_lock
);
/* disable, internal clock source */
iowrite32
(
0
,
wdt_base
+
TCR
);
davinci_writel
(
0
,
wdt_base
+
TCR
);
/* reset timer, set mode to 64-bit watchdog, and unreset */
iowrite32
(
0
,
wdt_base
+
TGCR
);
davinci_writel
(
0
,
wdt_base
+
TGCR
);
tgcr
=
TIMMODE_64BIT_WDOG
|
TIM12RS_UNRESET
|
TIM34RS_UNRESET
;
iowrite32
(
tgcr
,
wdt_base
+
TGCR
);
davinci_writel
(
tgcr
,
wdt_base
+
TGCR
);
/* clear counter regs */
iowrite32
(
0
,
wdt_base
+
TIM12
);
iowrite32
(
0
,
wdt_base
+
TIM34
);
davinci_writel
(
0
,
wdt_base
+
TIM12
);
davinci_writel
(
0
,
wdt_base
+
TIM34
);
/* set timeout period */
timer_margin
=
(((
u64
)
heartbeat
*
CLOCK_TICK_RATE
)
&
0xffffffff
);
iowrite32
(
timer_margin
,
wdt_base
+
PRD12
);
davinci_writel
(
timer_margin
,
wdt_base
+
PRD12
);
timer_margin
=
(((
u64
)
heartbeat
*
CLOCK_TICK_RATE
)
>>
32
);
iowrite32
(
timer_margin
,
wdt_base
+
PRD34
);
davinci_writel
(
timer_margin
,
wdt_base
+
PRD34
);
/* enable run continuously */
iowrite32
(
ENAMODE12_PERIODIC
,
wdt_base
+
TCR
);
davinci_writel
(
ENAMODE12_PERIODIC
,
wdt_base
+
TCR
);
/* Once the WDT is in pre-active state write to
* TIM12, TIM34, PRD12, PRD34, TCR, TGCR, WDTCR are
* write protected (except for the WDKEY field)
*/
/* put watchdog in pre-active state */
iowrite32
(
WDKEY_SEQ0
|
WDEN
,
wdt_base
+
WDTCR
);
davinci_writel
(
WDKEY_SEQ0
|
WDEN
,
wdt_base
+
WDTCR
);
/* put watchdog in active state */
iowrite32
(
WDKEY_SEQ1
|
WDEN
,
wdt_base
+
WDTCR
);
davinci_writel
(
WDKEY_SEQ1
|
WDEN
,
wdt_base
+
WDTCR
);
spin_unlock
(
&
io_lock
);
}
...
...
@@ -218,12 +218,7 @@ static int davinci_wdt_probe(struct platform_device *pdev)
printk
(
KERN_INFO
MODULE_NAME
"failed to get memory region
\n
"
);
return
-
ENOENT
;
}
wdt_base
=
ioremap
(
res
->
start
,
res
->
end
);
if
(
!
wdt_base
)
{
printk
(
KERN_ERR
MODULE_NAME
"failed to map memory region
\n
"
);
return
-
ENOMEM
;
}
wdt_base
=
(
void
__iomem
*
)(
res
->
start
);
ret
=
misc_register
(
&
davinci_wdt_miscdev
);
if
(
ret
<
0
)
{
...
...
@@ -234,7 +229,6 @@ static int davinci_wdt_probe(struct platform_device *pdev)
set_bit
(
WDT_DEVICE_INITED
,
&
wdt_status
);
}
iounmap
(
wdt_base
);
return
ret
;
}
...
...
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