Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
a6e6fc61
Commit
a6e6fc61
authored
17 years ago
by
Sergei Poselenov
Committed by
Wolfgang Denk
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added watchdog triggering calls in the "mtest" test function.
Signed-off-by:
Sergei Poselenov
<
sposelenov@emcraft.com
>
parent
d32a874b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/cmd_mem.c
+7
-0
7 additions, 0 deletions
common/cmd_mem.c
with
7 additions
and
0 deletions
common/cmd_mem.c
+
7
−
0
View file @
a6e6fc61
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#ifdef CONFIG_HAS_DATAFLASH
#ifdef CONFIG_HAS_DATAFLASH
#include
<dataflash.h>
#include
<dataflash.h>
#endif
#endif
#include
<watchdog.h>
#if defined(CONFIG_CMD_MEMORY) \
#if defined(CONFIG_CMD_MEMORY) \
|| defined(CONFIG_CMD_I2C) \
|| defined(CONFIG_CMD_I2C) \
...
@@ -868,6 +869,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
...
@@ -868,6 +869,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
}
}
}
start
[
test_offset
]
=
pattern
;
start
[
test_offset
]
=
pattern
;
WATCHDOG_RESET
();
/*
/*
* Check for addr bits stuck low or shorted.
* Check for addr bits stuck low or shorted.
...
@@ -905,6 +907,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
...
@@ -905,6 +907,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
* Fill memory with a known pattern.
* Fill memory with a known pattern.
*/
*/
for
(
pattern
=
1
,
offset
=
0
;
offset
<
num_words
;
pattern
++
,
offset
++
)
{
for
(
pattern
=
1
,
offset
=
0
;
offset
<
num_words
;
pattern
++
,
offset
++
)
{
WATCHDOG_RESET
();
start
[
offset
]
=
pattern
;
start
[
offset
]
=
pattern
;
}
}
...
@@ -912,6 +915,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
...
@@ -912,6 +915,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
* Check each location and invert it for the second pass.
* Check each location and invert it for the second pass.
*/
*/
for
(
pattern
=
1
,
offset
=
0
;
offset
<
num_words
;
pattern
++
,
offset
++
)
{
for
(
pattern
=
1
,
offset
=
0
;
offset
<
num_words
;
pattern
++
,
offset
++
)
{
WATCHDOG_RESET
();
temp
=
start
[
offset
];
temp
=
start
[
offset
];
if
(
temp
!=
pattern
)
{
if
(
temp
!=
pattern
)
{
printf
(
"
\n
FAILURE (read/write) @ 0x%.8lx:"
printf
(
"
\n
FAILURE (read/write) @ 0x%.8lx:"
...
@@ -928,6 +932,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
...
@@ -928,6 +932,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
* Check each location for the inverted pattern and zero it.
* Check each location for the inverted pattern and zero it.
*/
*/
for
(
pattern
=
1
,
offset
=
0
;
offset
<
num_words
;
pattern
++
,
offset
++
)
{
for
(
pattern
=
1
,
offset
=
0
;
offset
<
num_words
;
pattern
++
,
offset
++
)
{
WATCHDOG_RESET
();
anti_pattern
=
~
pattern
;
anti_pattern
=
~
pattern
;
temp
=
start
[
offset
];
temp
=
start
[
offset
];
if
(
temp
!=
anti_pattern
)
{
if
(
temp
!=
anti_pattern
)
{
...
@@ -954,6 +959,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
...
@@ -954,6 +959,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
pattern
,
""
);
pattern
,
""
);
for
(
addr
=
start
,
val
=
pattern
;
addr
<
end
;
addr
++
)
{
for
(
addr
=
start
,
val
=
pattern
;
addr
<
end
;
addr
++
)
{
WATCHDOG_RESET
();
*
addr
=
val
;
*
addr
=
val
;
val
+=
incr
;
val
+=
incr
;
}
}
...
@@ -961,6 +967,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
...
@@ -961,6 +967,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
puts
(
"Reading..."
);
puts
(
"Reading..."
);
for
(
addr
=
start
,
val
=
pattern
;
addr
<
end
;
addr
++
)
{
for
(
addr
=
start
,
val
=
pattern
;
addr
<
end
;
addr
++
)
{
WATCHDOG_RESET
();
readback
=
*
addr
;
readback
=
*
addr
;
if
(
readback
!=
val
)
{
if
(
readback
!=
val
)
{
printf
(
"
\n
Mem error @ 0x%08X: "
printf
(
"
\n
Mem error @ 0x%08X: "
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment