Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xcap-capability-linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
xcap
xcap-capability-linux
Commits
be8444bd
Commit
be8444bd
authored
18 years ago
by
David Woodhouse
Browse files
Options
Downloads
Patches
Plain Diff
[MTD] NAND: Add register debugging spew option to CAFÉ driver
Signed-off-by:
David Woodhouse
<
dwmw2@infradead.org
>
parent
195a253b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/mtd/nand/cafe.c
+13
-13
13 additions, 13 deletions
drivers/mtd/nand/cafe.c
with
13 additions
and
13 deletions
drivers/mtd/nand/cafe.c
+
13
−
13
View file @
be8444bd
...
@@ -72,6 +72,9 @@ module_param(skipbbt, int, 0644);
...
@@ -72,6 +72,9 @@ module_param(skipbbt, int, 0644);
static
int
debug
=
0
;
static
int
debug
=
0
;
module_param
(
debug
,
int
,
0644
);
module_param
(
debug
,
int
,
0644
);
static
int
regdebug
=
0
;
module_param
(
regdebug
,
int
,
0644
);
static
int
checkecc
=
1
;
static
int
checkecc
=
1
;
module_param
(
checkecc
,
int
,
0644
);
module_param
(
checkecc
,
int
,
0644
);
...
@@ -228,12 +231,6 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
...
@@ -228,12 +231,6 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
cafe_writel
(
cafe
,
cafe
->
ctl2
|
0x100
|
NAND_CMD_READSTART
,
NAND_CTRL2
);
cafe_writel
(
cafe
,
cafe
->
ctl2
|
0x100
|
NAND_CMD_READSTART
,
NAND_CTRL2
);
do_command:
do_command:
#if 0
/* http://dev.laptop.org/ticket/200
ECC on read only works if we read precisely 0x80e bytes */
if (cafe->datalen == 2112)
cafe->datalen = 2062;
#endif
cafe_dev_dbg
(
&
cafe
->
pdev
->
dev
,
"dlen %x, ctl1 %x, ctl2 %x
\n
"
,
cafe_dev_dbg
(
&
cafe
->
pdev
->
dev
,
"dlen %x, ctl1 %x, ctl2 %x
\n
"
,
cafe
->
datalen
,
ctl1
,
cafe_readl
(
cafe
,
NAND_CTRL2
));
cafe
->
datalen
,
ctl1
,
cafe_readl
(
cafe
,
NAND_CTRL2
));
...
@@ -254,13 +251,13 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
...
@@ -254,13 +251,13 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
}
}
cafe
->
datalen
=
0
;
cafe
->
datalen
=
0
;
#
if
0
if
(
unlikely
(
regdebug
))
{
{
int i;
int
i
;
printk("About to write command %08x\n", ctl1);
printk
(
"About to write command %08x
to register 0
\n
"
,
ctl1
);
for (i=
0
; i< 0x5c; i+=4)
for
(
i
=
4
;
i
<
0x5c
;
i
+=
4
)
printk("Register %x: %08x\n", i, readl(cafe->mmio + i));
printk
(
"Register %x: %08x
\n
"
,
i
,
readl
(
cafe
->
mmio
+
i
));
}
}
#endif
cafe_writel
(
cafe
,
ctl1
,
NAND_CTRL1
);
cafe_writel
(
cafe
,
ctl1
,
NAND_CTRL1
);
/* Apply this short delay always to ensure that we do wait tWB in
/* Apply this short delay always to ensure that we do wait tWB in
* any case on any machine. */
* any case on any machine. */
...
@@ -388,7 +385,10 @@ static int cafe_nand_read_page(struct mtd_info *mtd, struct nand_chip *chip,
...
@@ -388,7 +385,10 @@ static int cafe_nand_read_page(struct mtd_info *mtd, struct nand_chip *chip,
}
}
if
((
i
=
cafe_correct_ecc
(
buf
,
syn
))
<
0
)
{
if
((
i
=
cafe_correct_ecc
(
buf
,
syn
))
<
0
)
{
dev_dbg
(
&
cafe
->
pdev
->
dev
,
"Failed to correct ECC
\n
"
);
dev_dbg
(
&
cafe
->
pdev
->
dev
,
"Failed to correct ECC at %08x
\n
"
,
cafe_readl
(
cafe
,
NAND_ADDR2
)
*
2048
);
for
(
i
=
0
;
i
<
0x5c
;
i
+=
4
)
printk
(
"Register %x: %08x
\n
"
,
i
,
readl
(
cafe
->
mmio
+
i
));
mtd
->
ecc_stats
.
failed
++
;
mtd
->
ecc_stats
.
failed
++
;
}
else
{
}
else
{
dev_dbg
(
&
cafe
->
pdev
->
dev
,
"Corrected %d symbol errors
\n
"
,
i
);
dev_dbg
(
&
cafe
->
pdev
->
dev
,
"Corrected %d symbol errors
\n
"
,
i
);
...
...
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