Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uboot-i9100
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
Model registry
Operate
Environments
Monitor
Incidents
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
onny
uboot-i9100
Commits
ba22d10f
Commit
ba22d10f
authored
16 years ago
by
Scott Wood
Browse files
Options
Downloads
Patches
Plain Diff
quad100hd: Update NAND driver to new API.
Signed-off-by:
Scott Wood
<
scottwood@freescale.com
>
parent
f64cb652
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
board/quad100hd/nand.c
+13
-23
13 additions, 23 deletions
board/quad100hd/nand.c
with
13 additions
and
23 deletions
board/quad100hd/nand.c
+
13
−
23
View file @
ba22d10f
...
...
@@ -25,35 +25,25 @@
#include
<config.h>
#if defined(CONFIG_CMD_NAND)
#include
<asm/gpio.h>
#include
<asm/io.h>
#include
<nand.h>
/*
* hardware specific access to control-lines
*/
static
void
quad100hd_hwcontrol
(
struct
mtd_info
*
mtd
,
int
cmd
)
static
void
quad100hd_hwcontrol
(
struct
mtd_info
*
mtd
,
int
cmd
,
unsigned
int
ctrl
)
{
switch
(
cmd
)
{
case
NAND_CTL_SETCLE
:
gpio_write_bit
(
CFG_NAND_CLE
,
1
);
break
;
case
NAND_CTL_CLRCLE
:
gpio_write_bit
(
CFG_NAND_CLE
,
0
);
break
;
struct
nand_chip
*
this
=
mtd
->
priv
;
case
NAND_CTL_SETALE
:
gpio_write_bit
(
CFG_NAND_ALE
,
1
);
break
;
case
NAND_CTL_CLRALE
:
gpio_write_bit
(
CFG_NAND_ALE
,
0
);
break
;
case
NAND_CTL_SETNCE
:
gpio_write_bit
(
CFG_NAND_CE
,
0
);
break
;
case
NAND_CTL_CLRNCE
:
gpio_write_bit
(
CFG_NAND_CE
,
1
);
break
;
if
(
ctrl
&
NAND_CTRL_CHANGE
)
{
gpio_write_bit
(
CFG_NAND_CLE
,
!!
(
ctrl
&
NAND_CLE
));
gpio_write_bit
(
CFG_NAND_ALE
,
!!
(
ctrl
&
NAND_ALE
));
gpio_write_bit
(
CFG_NAND_CE
,
!
(
ctrl
&
NAND_NCE
));
}
if
(
cmd
!=
NAND_CMD_NONE
)
writeb
(
cmd
,
this
->
IO_ADDR_W
);
}
static
int
quad100hd_nand_ready
(
struct
mtd_info
*
mtd
)
...
...
@@ -67,9 +57,9 @@ static int quad100hd_nand_ready(struct mtd_info *mtd)
int
board_nand_init
(
struct
nand_chip
*
nand
)
{
/* Set address of hardware control function */
nand
->
hwcon
tr
o
l
=
quad100hd_hwcontrol
;
nand
->
cmd_c
trl
=
quad100hd_hwcontrol
;
nand
->
dev_ready
=
quad100hd_nand_ready
;
nand
->
eccmode
=
NAND_ECC_SOFT
;
nand
->
ecc
.
mode
=
NAND_ECC_SOFT
;
/* 15 us command delay time */
nand
->
chip_delay
=
20
;
...
...
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