Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ezynq
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
ezynq
Commits
f821878d
Commit
f821878d
authored
Mar 16, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed: system halt if the flash chip was not found
parent
e9d8bd29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
zynq_nand.c
u-boot-tree/drivers/mtd/nand/zynq_nand.c
+14
-4
No files found.
u-boot-tree/drivers/mtd/nand/zynq_nand.c
View file @
f821878d
...
@@ -279,6 +279,7 @@ static int zynq_nand_init_nand_flash(int option)
...
@@ -279,6 +279,7 @@ static int zynq_nand_init_nand_flash(int option)
status
=
zynq_nand_waitfor_ecc_completion
();
status
=
zynq_nand_waitfor_ecc_completion
();
if
(
status
<
0
)
{
if
(
status
<
0
)
{
printf
(
"%s: Timeout
\n
"
,
__func__
);
printf
(
"%s: Timeout
\n
"
,
__func__
);
udelay
(
100
);
return
status
;
return
status
;
}
}
...
@@ -776,6 +777,9 @@ static void zynq_nand_cmd_function(struct mtd_info *mtd, unsigned int command,
...
@@ -776,6 +777,9 @@ static void zynq_nand_cmd_function(struct mtd_info *mtd, unsigned int command,
unsigned
long
end_cmd_valid
=
0
;
unsigned
long
end_cmd_valid
=
0
;
unsigned
long
i
;
unsigned
long
i
;
/* Wait max 10 time units */
int
timeout
=
10
;
//printf(" zynq_nand(): Command=0x%02x Column=0x%02x PageAddr=0x%08x\n",command,column,page_addr);
//printf(" zynq_nand(): Command=0x%02x Column=0x%02x PageAddr=0x%08x\n",command,column,page_addr);
xnand
=
(
struct
zynq_nand_info
*
)
chip
->
priv
;
xnand
=
(
struct
zynq_nand_info
*
)
chip
->
priv
;
...
@@ -896,8 +900,14 @@ static void zynq_nand_cmd_function(struct mtd_info *mtd, unsigned int command,
...
@@ -896,8 +900,14 @@ static void zynq_nand_cmd_function(struct mtd_info *mtd, unsigned int command,
(
command
==
NAND_CMD_RESET
)
||
(
command
==
NAND_CMD_RESET
)
||
(
command
==
NAND_CMD_PARAM
)
||
(
command
==
NAND_CMD_PARAM
)
||
(
command
==
NAND_CMD_GET_FEATURES
))
{
(
command
==
NAND_CMD_GET_FEATURES
))
{
while
(
!
chip
->
dev_ready
(
mtd
))
while
(
!
chip
->
dev_ready
(
mtd
)){
;
if
(
timeout
==
0
)
{
printf
(
"ERROR: nand flash command timeout
\n
"
);
break
;
}
timeout
--
;
udelay
(
10
);
}
return
;
return
;
}
}
}
}
...
...
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