Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
u-boot-stm32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
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
Sami Nurmenniemi
u-boot-stm32
Commits
05ff4de5
Commit
05ff4de5
authored
Mar 10, 2017
by
Dmitry Konyshev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RM1349 Backport newer NAND bad block table management code
parent
0de06cfb
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
360 additions
and
130 deletions
+360
-130
drivers/mtd/nand/nand_bbt.c
drivers/mtd/nand/nand_bbt.c
+328
-127
include/linux/mtd/bbm.h
include/linux/mtd/bbm.h
+22
-3
include/linux/mtd/nand.h
include/linux/mtd/nand.h
+10
-0
No files found.
drivers/mtd/nand/nand_bbt.c
View file @
05ff4de5
This diff is collapsed.
Click to expand it.
include/linux/mtd/bbm.h
View file @
05ff4de5
...
@@ -11,8 +11,19 @@
...
@@ -11,8 +11,19 @@
* Thomas Gleixner <tglx@linuxtronix.de>
* Thomas Gleixner <tglx@linuxtronix.de>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
* published by the Free Software Foundation.
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
*/
#ifndef __LINUX_MTD_BBM_H
#ifndef __LINUX_MTD_BBM_H
#define __LINUX_MTD_BBM_H
#define __LINUX_MTD_BBM_H
...
@@ -76,7 +87,7 @@ struct nand_bbt_descr {
...
@@ -76,7 +87,7 @@ struct nand_bbt_descr {
#define NAND_BBT_PERCHIP 0x00000080
#define NAND_BBT_PERCHIP 0x00000080
/* bbt has a version counter at offset veroffs */
/* bbt has a version counter at offset veroffs */
#define NAND_BBT_VERSION 0x00000100
#define NAND_BBT_VERSION 0x00000100
/* Create a bbt if none
a
xists */
/* Create a bbt if none
e
xists */
#define NAND_BBT_CREATE 0x00000200
#define NAND_BBT_CREATE 0x00000200
/* Search good / bad pattern through all pages of a block */
/* Search good / bad pattern through all pages of a block */
#define NAND_BBT_SCANALLPAGES 0x00000400
#define NAND_BBT_SCANALLPAGES 0x00000400
...
@@ -88,6 +99,14 @@ struct nand_bbt_descr {
...
@@ -88,6 +99,14 @@ struct nand_bbt_descr {
#define NAND_BBT_SAVECONTENT 0x00002000
#define NAND_BBT_SAVECONTENT 0x00002000
/* Search good / bad pattern on the first and the second page */
/* Search good / bad pattern on the first and the second page */
#define NAND_BBT_SCAN2NDPAGE 0x00004000
#define NAND_BBT_SCAN2NDPAGE 0x00004000
/* Search good / bad pattern on the last page of the eraseblock */
#define NAND_BBT_SCANLASTPAGE 0x00008000
/* Chip stores bad block marker on BOTH 1st and 6th bytes of OOB */
#define NAND_BBT_SCANBYTE1AND6 0x00100000
/* The nand_bbt_descr was created dynamicaly and must be freed */
#define NAND_BBT_DYNAMICSTRUCT 0x00200000
/* The bad block table does not OOB for marker */
#define NAND_BBT_NO_OOB 0x00400000
/* The maximum number of blocks to scan for a bbt */
/* The maximum number of blocks to scan for a bbt */
#define NAND_BBT_SCAN_MAXBLOCKS 4
#define NAND_BBT_SCAN_MAXBLOCKS 4
...
...
include/linux/mtd/nand.h
View file @
05ff4de5
...
@@ -201,6 +201,16 @@ typedef enum {
...
@@ -201,6 +201,16 @@ typedef enum {
/* This option is defined if the board driver allocates its own buffers
/* This option is defined if the board driver allocates its own buffers
(e.g. because it needs them DMA-coherent */
(e.g. because it needs them DMA-coherent */
#define NAND_OWN_BUFFERS 0x00040000
#define NAND_OWN_BUFFERS 0x00040000
/* Chip may not exist, so silence any errors in scan */
#define NAND_SCAN_SILENT_NODEV 0x00080000
/*
* If passed additionally to NAND_USE_FLASH_BBT then BBT code will not touch
* the OOB area.
*/
#define NAND_USE_FLASH_BBT_NO_OOB 0x00800000
/* Create an empty BBT with no vendor information if the BBT is available */
#define NAND_CREATE_EMPTY_BBT 0x01000000
/* Options set by nand scan */
/* Options set by nand scan */
/* bbt has already been read */
/* bbt has already been read */
#define NAND_BBT_SCANNED 0x40000000
#define NAND_BBT_SCANNED 0x40000000
...
...
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