Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
90e260c8
Commit
90e260c8
authored
May 19, 2005
by
Thomas Gleixner
Committed by
Thomas Gleixner
May 23, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MTD] NAND: Honour autoplacement schemes supplied by the caller
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
a69dde91
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_base.c
+8
-2
include/mtd/mtd-abi.h
include/mtd/mtd-abi.h
+2
-1
No files found.
drivers/mtd/nand/nand_base.c
View file @
90e260c8
...
...
@@ -59,7 +59,7 @@
* The AG-AND chips have nice features for speed improvement,
* which are not supported yet. Read / program 4 pages in one go.
*
* $Id: nand_base.c,v 1.14
2 2005/04/11 14:16:07 lavinen
Exp $
* $Id: nand_base.c,v 1.14
3 2005/05/19 16:10:22 gleixner
Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
...
...
@@ -1195,7 +1195,8 @@ int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
}
/* get oob area, if we have no oob buffer from fs-driver */
if
(
!
oob_buf
||
oobsel
->
useecc
==
MTD_NANDECC_AUTOPLACE
)
if
(
!
oob_buf
||
oobsel
->
useecc
==
MTD_NANDECC_AUTOPLACE
||
oobsel
->
useecc
==
MTD_NANDECC_AUTOPL_USR
)
oob_data
=
&
this
->
data_buf
[
end
];
eccsteps
=
this
->
eccsteps
;
...
...
@@ -1284,6 +1285,7 @@ int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
/* without autoplace. Legacy mode used by YAFFS1 */
switch
(
oobsel
->
useecc
)
{
case
MTD_NANDECC_AUTOPLACE
:
case
MTD_NANDECC_AUTOPL_USR
:
/* Walk through the autoplace chunks */
for
(
i
=
0
;
oobsel
->
oobfree
[
i
][
1
];
i
++
)
{
int
from
=
oobsel
->
oobfree
[
i
][
0
];
...
...
@@ -1645,6 +1647,8 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
oobsel
=
this
->
autooob
;
autoplace
=
1
;
}
if
(
oobsel
->
useecc
==
MTD_NANDECC_AUTOPL_USR
)
autoplace
=
1
;
/* Setup variables and oob buffer */
totalpages
=
len
>>
this
->
page_shift
;
...
...
@@ -1919,6 +1923,8 @@ static int nand_writev_ecc (struct mtd_info *mtd, const struct kvec *vecs, unsig
oobsel
=
this
->
autooob
;
autoplace
=
1
;
}
if
(
oobsel
->
useecc
==
MTD_NANDECC_AUTOPL_USR
)
autoplace
=
1
;
/* Setup start page */
page
=
(
int
)
(
to
>>
this
->
page_shift
);
...
...
include/mtd/mtd-abi.h
View file @
90e260c8
/*
* $Id: mtd-abi.h,v 1.1
0 2005/02/09 09:17:42 pavlov
Exp $
* $Id: mtd-abi.h,v 1.1
1 2005/05/19 16:08:58 gleixner
Exp $
*
* Portions of MTD ABI definition which are shared by kernel and user space
*/
...
...
@@ -61,6 +61,7 @@ struct mtd_oob_buf {
#define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode)
#define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme
#define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read)
#define MTD_NANDECC_AUTOPL_USR 4 // Use the given autoplacement scheme rather than using the default
/* OTP mode selection */
#define MTD_OTP_OFF 0
...
...
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