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
be124c94
Commit
be124c94
authored
Jun 04, 2009
by
Sascha Hauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system.c: runtime base address
Signed-off-by:
Sascha Hauer
<
s.hauer@pengutronix.de
>
parent
8db5d1a6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
9 deletions
+19
-9
arch/arm/mach-mx1/generic.c
arch/arm/mach-mx1/generic.c
+1
-0
arch/arm/mach-mx2/generic.c
arch/arm/mach-mx2/generic.c
+2
-0
arch/arm/mach-mx3/mm.c
arch/arm/mach-mx3/mm.c
+2
-0
arch/arm/plat-mxc/include/mach/common.h
arch/arm/plat-mxc/include/mach/common.h
+1
-0
arch/arm/plat-mxc/system.c
arch/arm/plat-mxc/system.c
+13
-9
No files found.
arch/arm/mach-mx1/generic.c
View file @
be124c94
...
@@ -41,6 +41,7 @@ static struct map_desc imx_io_desc[] __initdata = {
...
@@ -41,6 +41,7 @@ static struct map_desc imx_io_desc[] __initdata = {
void
__init
mx1_map_io
(
void
)
void
__init
mx1_map_io
(
void
)
{
{
mxc_set_cpu_type
(
MXC_CPU_MX1
);
mxc_set_cpu_type
(
MXC_CPU_MX1
);
mxc_arch_reset_init
(
IO_ADDRESS
(
WDT_BASE_ADDR
));
iotable_init
(
imx_io_desc
,
ARRAY_SIZE
(
imx_io_desc
));
iotable_init
(
imx_io_desc
,
ARRAY_SIZE
(
imx_io_desc
));
}
}
arch/arm/mach-mx2/generic.c
View file @
be124c94
...
@@ -72,6 +72,7 @@ static struct map_desc mxc_io_desc[] __initdata = {
...
@@ -72,6 +72,7 @@ static struct map_desc mxc_io_desc[] __initdata = {
void
__init
mx21_map_io
(
void
)
void
__init
mx21_map_io
(
void
)
{
{
mxc_set_cpu_type
(
MXC_CPU_MX21
);
mxc_set_cpu_type
(
MXC_CPU_MX21
);
mxc_arch_reset_init
(
IO_ADDRESS
(
WDOG_BASE_ADDR
));
iotable_init
(
mxc_io_desc
,
ARRAY_SIZE
(
mxc_io_desc
));
iotable_init
(
mxc_io_desc
,
ARRAY_SIZE
(
mxc_io_desc
));
}
}
...
@@ -79,6 +80,7 @@ void __init mx21_map_io(void)
...
@@ -79,6 +80,7 @@ void __init mx21_map_io(void)
void
__init
mx27_map_io
(
void
)
void
__init
mx27_map_io
(
void
)
{
{
mxc_set_cpu_type
(
MXC_CPU_MX27
);
mxc_set_cpu_type
(
MXC_CPU_MX27
);
mxc_arch_reset_init
(
IO_ADDRESS
(
WDOG_BASE_ADDR
));
iotable_init
(
mxc_io_desc
,
ARRAY_SIZE
(
mxc_io_desc
));
iotable_init
(
mxc_io_desc
,
ARRAY_SIZE
(
mxc_io_desc
));
}
}
...
...
arch/arm/mach-mx3/mm.c
View file @
be124c94
...
@@ -75,6 +75,7 @@ static struct map_desc mxc_io_desc[] __initdata = {
...
@@ -75,6 +75,7 @@ static struct map_desc mxc_io_desc[] __initdata = {
void
__init
mx31_map_io
(
void
)
void
__init
mx31_map_io
(
void
)
{
{
mxc_set_cpu_type
(
MXC_CPU_MX31
);
mxc_set_cpu_type
(
MXC_CPU_MX31
);
mxc_arch_reset_init
(
IO_ADDRESS
(
WDOG_BASE_ADDR
));
iotable_init
(
mxc_io_desc
,
ARRAY_SIZE
(
mxc_io_desc
));
iotable_init
(
mxc_io_desc
,
ARRAY_SIZE
(
mxc_io_desc
));
}
}
...
@@ -82,6 +83,7 @@ void __init mx31_map_io(void)
...
@@ -82,6 +83,7 @@ void __init mx31_map_io(void)
void
__init
mx35_map_io
(
void
)
void
__init
mx35_map_io
(
void
)
{
{
mxc_set_cpu_type
(
MXC_CPU_MX35
);
mxc_set_cpu_type
(
MXC_CPU_MX35
);
mxc_arch_reset_init
(
IO_ADDRESS
(
WDOG_BASE_ADDR
));
iotable_init
(
mxc_io_desc
,
ARRAY_SIZE
(
mxc_io_desc
));
iotable_init
(
mxc_io_desc
,
ARRAY_SIZE
(
mxc_io_desc
));
}
}
...
...
arch/arm/plat-mxc/include/mach/common.h
View file @
be124c94
...
@@ -29,5 +29,6 @@ extern int mx35_clocks_init(void);
...
@@ -29,5 +29,6 @@ extern int mx35_clocks_init(void);
extern
int
mxc_register_gpios
(
void
);
extern
int
mxc_register_gpios
(
void
);
extern
int
mxc_register_device
(
struct
platform_device
*
pdev
,
void
*
data
);
extern
int
mxc_register_device
(
struct
platform_device
*
pdev
,
void
*
data
);
extern
void
mxc_set_cpu_type
(
unsigned
int
type
);
extern
void
mxc_set_cpu_type
(
unsigned
int
type
);
extern
void
mxc_arch_reset_init
(
void
__iomem
*
);
#endif
#endif
arch/arm/plat-mxc/system.c
View file @
be124c94
...
@@ -30,29 +30,28 @@
...
@@ -30,29 +30,28 @@
#include <asm/proc-fns.h>
#include <asm/proc-fns.h>
#include <asm/system.h>
#include <asm/system.h>
#ifdef CONFIG_ARCH_MX1
static
void
__iomem
*
wdog_base
;
#define WDOG_WCR_REG IO_ADDRESS(WDT_BASE_ADDR)
#define WDOG_WCR_ENABLE (1 << 0)
#else
#define WDOG_WCR_REG IO_ADDRESS(WDOG_BASE_ADDR)
#define WDOG_WCR_ENABLE (1 << 2)
#endif
/*
/*
* Reset the system. It is called by machine_restart().
* Reset the system. It is called by machine_restart().
*/
*/
void
arch_reset
(
char
mode
,
const
char
*
cmd
)
void
arch_reset
(
char
mode
,
const
char
*
cmd
)
{
{
if
(
!
cpu_is_mx1
())
{
unsigned
int
wcr_enable
;
if
(
cpu_is_mx1
())
{
wcr_enable
=
(
1
<<
0
);
}
else
{
struct
clk
*
clk
;
struct
clk
*
clk
;
clk
=
clk_get_sys
(
"imx-wdt.0"
,
NULL
);
clk
=
clk_get_sys
(
"imx-wdt.0"
,
NULL
);
if
(
!
IS_ERR
(
clk
))
if
(
!
IS_ERR
(
clk
))
clk_enable
(
clk
);
clk_enable
(
clk
);
wcr_enable
=
(
1
<<
2
);
}
}
/* Assert SRS signal */
/* Assert SRS signal */
__raw_writew
(
WDOG_WCR_ENABLE
,
WDOG_WCR_REG
);
__raw_writew
(
wcr_enable
,
wdog_base
);
/* wait for reset to assert... */
/* wait for reset to assert... */
mdelay
(
500
);
mdelay
(
500
);
...
@@ -65,3 +64,8 @@ void arch_reset(char mode, const char *cmd)
...
@@ -65,3 +64,8 @@ void arch_reset(char mode, const char *cmd)
/* we'll take a jump through zero as a poor second */
/* we'll take a jump through zero as a poor second */
cpu_reset
(
0
);
cpu_reset
(
0
);
}
}
void
mxc_arch_reset_init
(
void
__iomem
*
base
)
{
wdog_base
=
base
;
}
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