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
Kirill Smelkov
linux
Commits
fb631387
Commit
fb631387
authored
Apr 29, 2009
by
Kevin Hilman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
davinci: add platform support for watchdog timer
Signed-off-by:
Kevin Hilman
<
khilman@deeprootsystems.com
>
parent
0521444d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
5 deletions
+42
-5
arch/arm/mach-davinci/clock.h
arch/arm/mach-davinci/clock.h
+3
-0
arch/arm/mach-davinci/devices.c
arch/arm/mach-davinci/devices.c
+35
-0
arch/arm/mach-davinci/time.c
arch/arm/mach-davinci/time.c
+4
-5
No files found.
arch/arm/mach-davinci/clock.h
View file @
fb631387
...
...
@@ -93,4 +93,7 @@ struct davinci_clk {
}
int
davinci_clk_init
(
struct
davinci_clk
*
clocks
);
extern
struct
platform_device
davinci_wdt_device
;
#endif
arch/arm/mach-davinci/devices.c
View file @
fb631387
...
...
@@ -54,3 +54,38 @@ void __init davinci_init_i2c(struct davinci_i2c_platform_data *pdata)
(
void
)
platform_device_register
(
&
davinci_i2c_device
);
}
/*-------------------------------------------------------------------------*/
static
struct
resource
wdt_resources
[]
=
{
{
.
start
=
0x01c21c00
,
.
end
=
0x01c21fff
,
.
flags
=
IORESOURCE_MEM
,
},
};
struct
platform_device
davinci_wdt_device
=
{
.
name
=
"watchdog"
,
.
id
=
-
1
,
.
num_resources
=
ARRAY_SIZE
(
wdt_resources
),
.
resource
=
wdt_resources
,
};
static
void
davinci_init_wdt
(
void
)
{
platform_device_register
(
&
davinci_wdt_device
);
}
/*-------------------------------------------------------------------------*/
static
int
__init
davinci_init_devices
(
void
)
{
/* please keep these calls, and their implementations above,
* in alphabetical order so they're easier to sort through.
*/
davinci_init_wdt
();
return
0
;
}
arch_initcall
(
davinci_init_devices
);
arch/arm/mach-davinci/time.c
View file @
fb631387
...
...
@@ -19,6 +19,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <mach/hardware.h>
#include <asm/system.h>
...
...
@@ -349,15 +350,13 @@ struct sys_timer davinci_timer = {
/* reset board using watchdog timer */
void
davinci_watchdog_reset
(
void
)
{
void
davinci_watchdog_reset
(
void
)
{
u32
tgcr
,
wdtcr
;
void
__iomem
*
base
=
IO_ADDRESS
(
DAVINCI_WDOG_BASE
);
struct
device
dev
;
struct
clk
*
wd_clk
;
char
*
name
=
"watchdog"
;
dev_set_name
(
&
dev
,
name
);
wd_clk
=
clk_get
(
&
dev
,
NULL
);
wd_clk
=
clk_get
(
&
davinci_wdt_device
.
dev
,
NULL
);
if
(
WARN_ON
(
IS_ERR
(
wd_clk
)))
return
;
clk_enable
(
wd_clk
);
...
...
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