Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
61ecfa87
Commit
61ecfa87
authored
Nov 07, 2005
by
Thomas Gleixner
Committed by
Thomas Gleixner
Nov 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MTD] includes: Clean up trailing white spaces
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
03ead842
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
118 additions
and
118 deletions
+118
-118
include/linux/mtd/bbm.h
include/linux/mtd/bbm.h
+1
-1
include/linux/mtd/blktrans.h
include/linux/mtd/blktrans.h
+2
-2
include/linux/mtd/cfi.h
include/linux/mtd/cfi.h
+12
-12
include/linux/mtd/doc2000.h
include/linux/mtd/doc2000.h
+9
-9
include/linux/mtd/flashchip.h
include/linux/mtd/flashchip.h
+7
-7
include/linux/mtd/ftl.h
include/linux/mtd/ftl.h
+3
-3
include/linux/mtd/gen_probe.h
include/linux/mtd/gen_probe.h
+2
-2
include/linux/mtd/jedec.h
include/linux/mtd/jedec.h
+10
-10
include/linux/mtd/map.h
include/linux/mtd/map.h
+7
-7
include/linux/mtd/mtd.h
include/linux/mtd/mtd.h
+12
-12
include/linux/mtd/nand.h
include/linux/mtd/nand.h
+27
-27
include/linux/mtd/onenand.h
include/linux/mtd/onenand.h
+1
-1
include/linux/mtd/partitions.h
include/linux/mtd/partitions.h
+10
-10
include/linux/mtd/physmap.h
include/linux/mtd/physmap.h
+6
-6
include/linux/mtd/pmc551.h
include/linux/mtd/pmc551.h
+6
-6
include/linux/mtd/xip.h
include/linux/mtd/xip.h
+3
-3
No files found.
include/linux/mtd/bbm.h
View file @
61ecfa87
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
* @param version version read from the bbt page during scan
* @param version version read from the bbt page during scan
* @param len length of the pattern, if 0 no pattern check is performed
* @param len length of the pattern, if 0 no pattern check is performed
* @param maxblocks maximum number of blocks to search for a bbt. This number of
* @param maxblocks maximum number of blocks to search for a bbt. This number of
* blocks is reserved at the end of the device
* blocks is reserved at the end of the device
* where the tables are written.
* where the tables are written.
* @param reserved_block_code if non-0, this pattern denotes a reserved
* @param reserved_block_code if non-0, this pattern denotes a reserved
* (rather than bad) block in the stored bbt
* (rather than bad) block in the stored bbt
...
...
include/linux/mtd/blktrans.h
View file @
61ecfa87
/*
/*
* $Id: blktrans.h,v 1.
5 2003/06/23 12:00:08 dwmw2
Exp $
* $Id: blktrans.h,v 1.
6 2005/11/07 11:14:54 gleixner
Exp $
*
*
* (C) 2003 David Woodhouse <dwmw2@infradead.org>
* (C) 2003 David Woodhouse <dwmw2@infradead.org>
*
*
...
@@ -67,6 +67,6 @@ extern int register_mtd_blktrans(struct mtd_blktrans_ops *tr);
...
@@ -67,6 +67,6 @@ extern int register_mtd_blktrans(struct mtd_blktrans_ops *tr);
extern
int
deregister_mtd_blktrans
(
struct
mtd_blktrans_ops
*
tr
);
extern
int
deregister_mtd_blktrans
(
struct
mtd_blktrans_ops
*
tr
);
extern
int
add_mtd_blktrans_dev
(
struct
mtd_blktrans_dev
*
dev
);
extern
int
add_mtd_blktrans_dev
(
struct
mtd_blktrans_dev
*
dev
);
extern
int
del_mtd_blktrans_dev
(
struct
mtd_blktrans_dev
*
dev
);
extern
int
del_mtd_blktrans_dev
(
struct
mtd_blktrans_dev
*
dev
);
#endif
/* __MTD_TRANS_H__ */
#endif
/* __MTD_TRANS_H__ */
include/linux/mtd/cfi.h
View file @
61ecfa87
/* Common Flash Interface structures
/* Common Flash Interface structures
* See http://support.intel.com/design/flash/technote/index.htm
* See http://support.intel.com/design/flash/technote/index.htm
* $Id: cfi.h,v 1.5
5 2005/08/06 04:40:42 nico
Exp $
* $Id: cfi.h,v 1.5
6 2005/11/07 11:14:54 gleixner
Exp $
*/
*/
#ifndef __MTD_CFI_H__
#ifndef __MTD_CFI_H__
...
@@ -82,8 +82,8 @@ static inline int cfi_interleave_supported(int i)
...
@@ -82,8 +82,8 @@ static inline int cfi_interleave_supported(int i)
}
}
/* NB: these values must represents the number of bytes needed to meet the
/* NB: these values must represents the number of bytes needed to meet the
* device type (x8, x16, x32). Eg. a 32 bit device is 4 x 8 bytes.
* device type (x8, x16, x32). Eg. a 32 bit device is 4 x 8 bytes.
* These numbers are used in calculations.
* These numbers are used in calculations.
*/
*/
#define CFI_DEVICETYPE_X8 (8 / 8)
#define CFI_DEVICETYPE_X8 (8 / 8)
...
@@ -259,7 +259,7 @@ static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, int interleave, int
...
@@ -259,7 +259,7 @@ static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, int interleave, int
/*
/*
* Transforms the CFI command for the given geometry (bus width & interleave).
* Transforms the CFI command for the given geometry (bus width & interleave).
* It looks too long to be inline, but in the common case it should almost all
* It looks too long to be inline, but in the common case it should almost all
* get optimised away.
* get optimised away.
*/
*/
static
inline
map_word
cfi_build_cmd
(
u_long
cmd
,
struct
map_info
*
map
,
struct
cfi_private
*
cfi
)
static
inline
map_word
cfi_build_cmd
(
u_long
cmd
,
struct
map_info
*
map
,
struct
cfi_private
*
cfi
)
{
{
...
@@ -268,7 +268,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
...
@@ -268,7 +268,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
unsigned
long
onecmd
;
unsigned
long
onecmd
;
int
i
;
int
i
;
/* We do it this way to give the compiler a fighting chance
/* We do it this way to give the compiler a fighting chance
of optimising away all the crap for 'bankwidth' larger than
of optimising away all the crap for 'bankwidth' larger than
an unsigned long, in the common case where that support is
an unsigned long, in the common case where that support is
disabled */
disabled */
...
@@ -279,7 +279,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
...
@@ -279,7 +279,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
wordwidth
=
map_bankwidth
(
map
);
wordwidth
=
map_bankwidth
(
map
);
words_per_bus
=
1
;
words_per_bus
=
1
;
}
}
chip_mode
=
map_bankwidth
(
map
)
/
cfi_interleave
(
cfi
);
chip_mode
=
map_bankwidth
(
map
)
/
cfi_interleave
(
cfi
);
chips_per_word
=
wordwidth
*
cfi_interleave
(
cfi
)
/
map_bankwidth
(
map
);
chips_per_word
=
wordwidth
*
cfi_interleave
(
cfi
)
/
map_bankwidth
(
map
);
...
@@ -298,7 +298,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
...
@@ -298,7 +298,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
break
;
break
;
}
}
/* Now replicate it across the size of an unsigned long, or
/* Now replicate it across the size of an unsigned long, or
just to the bus width as appropriate */
just to the bus width as appropriate */
switch
(
chips_per_word
)
{
switch
(
chips_per_word
)
{
default:
BUG
();
default:
BUG
();
...
@@ -314,7 +314,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
...
@@ -314,7 +314,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
;
;
}
}
/* And finally, for the multi-word case, replicate it
/* And finally, for the multi-word case, replicate it
in all words in the structure */
in all words in the structure */
for
(
i
=
0
;
i
<
words_per_bus
;
i
++
)
{
for
(
i
=
0
;
i
<
words_per_bus
;
i
++
)
{
val
.
x
[
i
]
=
onecmd
;
val
.
x
[
i
]
=
onecmd
;
...
@@ -325,14 +325,14 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
...
@@ -325,14 +325,14 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
#define CMD(x) cfi_build_cmd((x), map, cfi)
#define CMD(x) cfi_build_cmd((x), map, cfi)
static
inline
unsigned
long
cfi_merge_status
(
map_word
val
,
struct
map_info
*
map
,
static
inline
unsigned
long
cfi_merge_status
(
map_word
val
,
struct
map_info
*
map
,
struct
cfi_private
*
cfi
)
struct
cfi_private
*
cfi
)
{
{
int
wordwidth
,
words_per_bus
,
chip_mode
,
chips_per_word
;
int
wordwidth
,
words_per_bus
,
chip_mode
,
chips_per_word
;
unsigned
long
onestat
,
res
=
0
;
unsigned
long
onestat
,
res
=
0
;
int
i
;
int
i
;
/* We do it this way to give the compiler a fighting chance
/* We do it this way to give the compiler a fighting chance
of optimising away all the crap for 'bankwidth' larger than
of optimising away all the crap for 'bankwidth' larger than
an unsigned long, in the common case where that support is
an unsigned long, in the common case where that support is
disabled */
disabled */
...
@@ -343,7 +343,7 @@ static inline unsigned long cfi_merge_status(map_word val, struct map_info *map,
...
@@ -343,7 +343,7 @@ static inline unsigned long cfi_merge_status(map_word val, struct map_info *map,
wordwidth
=
map_bankwidth
(
map
);
wordwidth
=
map_bankwidth
(
map
);
words_per_bus
=
1
;
words_per_bus
=
1
;
}
}
chip_mode
=
map_bankwidth
(
map
)
/
cfi_interleave
(
cfi
);
chip_mode
=
map_bankwidth
(
map
)
/
cfi_interleave
(
cfi
);
chips_per_word
=
wordwidth
*
cfi_interleave
(
cfi
)
/
map_bankwidth
(
map
);
chips_per_word
=
wordwidth
*
cfi_interleave
(
cfi
)
/
map_bankwidth
(
map
);
...
...
include/linux/mtd/doc2000.h
View file @
61ecfa87
/*
/*
* Linux driver for Disk-On-Chip devices
* Linux driver for Disk-On-Chip devices
*
*
* Copyright (C) 1999 Machine Vision Holdings, Inc.
* Copyright (C) 1999 Machine Vision Holdings, Inc.
* Copyright (C) 2001-2003 David Woodhouse <dwmw2@infradead.org>
* Copyright (C) 2001-2003 David Woodhouse <dwmw2@infradead.org>
* Copyright (C) 2002-2003 Greg Ungerer <gerg@snapgear.com>
* Copyright (C) 2002-2003 Greg Ungerer <gerg@snapgear.com>
* Copyright (C) 2002-2003 SnapGear Inc
* Copyright (C) 2002-2003 SnapGear Inc
*
*
* $Id: doc2000.h,v 1.2
4 2005/01/05 12:40:38 dwmw2 Exp $
* $Id: doc2000.h,v 1.2
5 2005/11/07 11:14:54 gleixner Exp $
*
*
* Released under GPL
* Released under GPL
*/
*/
...
@@ -75,10 +75,10 @@
...
@@ -75,10 +75,10 @@
#define DoC_Mplus_CtrlConfirm 0x1076
#define DoC_Mplus_CtrlConfirm 0x1076
#define DoC_Mplus_Power 0x1fff
#define DoC_Mplus_Power 0x1fff
/* How to access the device?
/* How to access the device?
* On ARM, it'll be mmap'd directly with 32-bit wide accesses.
* On ARM, it'll be mmap'd directly with 32-bit wide accesses.
* On PPC, it's mmap'd and 16-bit wide.
* On PPC, it's mmap'd and 16-bit wide.
* Others use readb/writeb
* Others use readb/writeb
*/
*/
#if defined(__arm__)
#if defined(__arm__)
#define ReadDOC_(adr, reg) ((unsigned char)(*(volatile __u32 *)(((unsigned long)adr)+((reg)<<2))))
#define ReadDOC_(adr, reg) ((unsigned char)(*(volatile __u32 *)(((unsigned long)adr)+((reg)<<2))))
...
@@ -172,7 +172,7 @@ struct DiskOnChip {
...
@@ -172,7 +172,7 @@ struct DiskOnChip {
unsigned
long
totlen
;
unsigned
long
totlen
;
unsigned
char
ChipID
;
/* Type of DiskOnChip */
unsigned
char
ChipID
;
/* Type of DiskOnChip */
int
ioreg
;
int
ioreg
;
unsigned
long
mfr
;
/* Flash IDs - only one type of flash per device */
unsigned
long
mfr
;
/* Flash IDs - only one type of flash per device */
unsigned
long
id
;
unsigned
long
id
;
int
chipshift
;
int
chipshift
;
...
@@ -180,10 +180,10 @@ struct DiskOnChip {
...
@@ -180,10 +180,10 @@ struct DiskOnChip {
char
pageadrlen
;
char
pageadrlen
;
char
interleave
;
/* Internal interleaving - Millennium Plus style */
char
interleave
;
/* Internal interleaving - Millennium Plus style */
unsigned
long
erasesize
;
unsigned
long
erasesize
;
int
curfloor
;
int
curfloor
;
int
curchip
;
int
curchip
;
int
numchips
;
int
numchips
;
struct
Nand
*
chips
;
struct
Nand
*
chips
;
struct
mtd_info
*
nextdoc
;
struct
mtd_info
*
nextdoc
;
...
...
include/linux/mtd/flashchip.h
View file @
61ecfa87
/*
/*
* struct flchip definition
* struct flchip definition
*
*
* Contains information about the location and state of a given flash device
* Contains information about the location and state of a given flash device
*
*
* (C) 2000 Red Hat. GPLd.
* (C) 2000 Red Hat. GPLd.
*
*
* $Id: flashchip.h,v 1.1
7 2005/03/14 18:27:15 bjd
Exp $
* $Id: flashchip.h,v 1.1
8 2005/11/07 11:14:54 gleixner
Exp $
*
*
*/
*/
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
/* For spinlocks. sched.h includes spinlock.h from whichever directory it
/* For spinlocks. sched.h includes spinlock.h from whichever directory it
* happens to be in - so we don't have to care whether we're on 2.2, which
* happens to be in - so we don't have to care whether we're on 2.2, which
* has asm/spinlock.h, or 2.4, which has linux/spinlock.h
* has asm/spinlock.h, or 2.4, which has linux/spinlock.h
*/
*/
#include <linux/sched.h>
#include <linux/sched.h>
typedef
enum
{
typedef
enum
{
FL_READY
,
FL_READY
,
FL_STATUS
,
FL_STATUS
,
FL_CFI_QUERY
,
FL_CFI_QUERY
,
...
@@ -45,7 +45,7 @@ typedef enum {
...
@@ -45,7 +45,7 @@ typedef enum {
/* NOTE: confusingly, this can be used to refer to more than one chip at a time,
/* NOTE: confusingly, this can be used to refer to more than one chip at a time,
if they're interleaved. This can even refer to individual partitions on
if they're interleaved. This can even refer to individual partitions on
the same physical chip when present. */
the same physical chip when present. */
...
...
include/linux/mtd/ftl.h
View file @
61ecfa87
/*
/*
* $Id: ftl.h,v 1.
6 2003/01/24 13:20:04 dwmw2
Exp $
* $Id: ftl.h,v 1.
7 2005/11/07 11:14:54 gleixner
Exp $
*
*
* Derived from (and probably identical to):
* Derived from (and probably identical to):
* ftl.h 1.7 1999/10/25 20:23:17
* ftl.h 1.7 1999/10/25 20:23:17
*
*
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
* Software distributed under the License is distributed on an "AS IS"
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and
* the License for the specific language governing rights and
* limitations under the License.
* limitations under the License.
*
*
* The initial developer of the original code is David A. Hinds
* The initial developer of the original code is David A. Hinds
* <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
* <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
...
...
include/linux/mtd/gen_probe.h
View file @
61ecfa87
/*
/*
* (C) 2001, 2001 Red Hat, Inc.
* (C) 2001, 2001 Red Hat, Inc.
* GPL'd
* GPL'd
* $Id: gen_probe.h,v 1.
3 2004/10/20 22:10:33 dwmw2
Exp $
* $Id: gen_probe.h,v 1.
4 2005/11/07 11:14:54 gleixner
Exp $
*/
*/
#ifndef __LINUX_MTD_GEN_PROBE_H__
#ifndef __LINUX_MTD_GEN_PROBE_H__
#define __LINUX_MTD_GEN_PROBE_H__
#define __LINUX_MTD_GEN_PROBE_H__
#include <linux/mtd/flashchip.h>
#include <linux/mtd/flashchip.h>
#include <linux/mtd/map.h>
#include <linux/mtd/map.h>
#include <linux/mtd/cfi.h>
#include <linux/mtd/cfi.h>
#include <linux/bitops.h>
#include <linux/bitops.h>
...
...
include/linux/mtd/jedec.h
View file @
61ecfa87
/* JEDEC Flash Interface.
/* JEDEC Flash Interface.
* This is an older type of interface for self programming flash. It is
* This is an older type of interface for self programming flash. It is
* commonly use in older AMD chips and is obsolete compared with CFI.
* commonly use in older AMD chips and is obsolete compared with CFI.
* It is called JEDEC because the JEDEC association distributes the ID codes
* It is called JEDEC because the JEDEC association distributes the ID codes
* for the chips.
* for the chips.
*
*
* See the AMD flash databook for information on how to operate the interface.
* See the AMD flash databook for information on how to operate the interface.
*
*
* $Id: jedec.h,v 1.
3 2003/05/21 11:51:01 dwmw2
Exp $
* $Id: jedec.h,v 1.
4 2005/11/07 11:14:54 gleixner
Exp $
*/
*/
#ifndef __LINUX_MTD_JEDEC_H__
#ifndef __LINUX_MTD_JEDEC_H__
...
@@ -33,16 +33,16 @@ struct jedec_flash_chip
...
@@ -33,16 +33,16 @@ struct jedec_flash_chip
__u16
jedec
;
__u16
jedec
;
unsigned
long
size
;
unsigned
long
size
;
unsigned
long
sectorsize
;
unsigned
long
sectorsize
;
// *(__u8*)(base + (adder << addrshift)) = data << datashift
// *(__u8*)(base + (adder << addrshift)) = data << datashift
// Address size = size << addrshift
// Address size = size << addrshift
unsigned
long
base
;
// Byte 0 of the flash, will be unaligned
unsigned
long
base
;
// Byte 0 of the flash, will be unaligned
unsigned
int
datashift
;
// Useful for 32bit/16bit accesses
unsigned
int
datashift
;
// Useful for 32bit/16bit accesses
unsigned
int
addrshift
;
unsigned
int
addrshift
;
unsigned
long
offset
;
// linerized start. base==offset for unbanked, uninterleaved flash
unsigned
long
offset
;
// linerized start. base==offset for unbanked, uninterleaved flash
__u32
capabilities
;
__u32
capabilities
;
// These markers are filled in by the flash_chip_scan function
// These markers are filled in by the flash_chip_scan function
unsigned
long
start
;
unsigned
long
start
;
unsigned
long
length
;
unsigned
long
length
;
...
@@ -51,16 +51,16 @@ struct jedec_flash_chip
...
@@ -51,16 +51,16 @@ struct jedec_flash_chip
struct
jedec_private
struct
jedec_private
{
{
unsigned
long
size
;
// Total size of all the devices
unsigned
long
size
;
// Total size of all the devices
/* Bank handling. If sum(bank_fill) == size then this is linear flash.
/* Bank handling. If sum(bank_fill) == size then this is linear flash.
Otherwise the mapping has holes in it. bank_fill may be used to
Otherwise the mapping has holes in it. bank_fill may be used to
find the holes, but in the common symetric case
find the holes, but in the common symetric case
bank_fill[0] == bank_fill[*], thus addresses may be computed
bank_fill[0] == bank_fill[*], thus addresses may be computed
mathmatically. bank_fill must be powers of two */
mathmatically. bank_fill must be powers of two */
unsigned
is_banked
;
unsigned
is_banked
;
unsigned
long
bank_fill
[
MAX_JEDEC_CHIPS
];
unsigned
long
bank_fill
[
MAX_JEDEC_CHIPS
];
struct
jedec_flash_chip
chips
[
MAX_JEDEC_CHIPS
];
struct
jedec_flash_chip
chips
[
MAX_JEDEC_CHIPS
];
};
};
#endif
#endif
include/linux/mtd/map.h
View file @
61ecfa87
/* Overhauled routines for dealing with different mmap regions of flash */
/* Overhauled routines for dealing with different mmap regions of flash */
/* $Id: map.h,v 1.5
2 2005/05/25 10:29:41
gleixner Exp $ */
/* $Id: map.h,v 1.5
4 2005/11/07 11:14:54
gleixner Exp $ */
#ifndef __LINUX_MTD_MAP_H__
#ifndef __LINUX_MTD_MAP_H__
#define __LINUX_MTD_MAP_H__
#define __LINUX_MTD_MAP_H__
...
@@ -170,14 +170,14 @@ typedef union {
...
@@ -170,14 +170,14 @@ typedef union {
to a chip probe routine -- either JEDEC or CFI probe or both -- via
to a chip probe routine -- either JEDEC or CFI probe or both -- via
do_map_probe(). If a chip is recognised, the probe code will invoke the
do_map_probe(). If a chip is recognised, the probe code will invoke the
appropriate chip driver (if present) and return a struct mtd_info.
appropriate chip driver (if present) and return a struct mtd_info.
At which point, you fill in the mtd->module with your own module
At which point, you fill in the mtd->module with your own module
address, and register it with the MTD core code. Or you could partition
address, and register it with the MTD core code. Or you could partition
it and register the partitions instead, or keep it for your own private
it and register the partitions instead, or keep it for your own private
use; whatever.
use; whatever.
The mtd->priv field will point to the struct map_info, and any further
The mtd->priv field will point to the struct map_info, and any further
private data required by the chip driver is linked from the
private data required by the chip driver is linked from the
mtd->priv->fldrv_priv field. This allows the map driver to get at
mtd->priv->fldrv_priv field. This allows the map driver to get at
the destructor function map->fldrv_destroy() when it's tired
the destructor function map->fldrv_destroy() when it's tired
of living.
of living.
*/
*/
...
@@ -214,7 +214,7 @@ struct map_info {
...
@@ -214,7 +214,7 @@ struct map_info {
If there is no cache to care about this can be set to NULL. */
If there is no cache to care about this can be set to NULL. */
void
(
*
inval_cache
)(
struct
map_info
*
,
unsigned
long
,
ssize_t
);
void
(
*
inval_cache
)(
struct
map_info
*
,
unsigned
long
,
ssize_t
);
/* set_vpp() must handle being reentered -- enable, enable, disable
/* set_vpp() must handle being reentered -- enable, enable, disable
must leave it enabled. */
must leave it enabled. */
void
(
*
set_vpp
)(
struct
map_info
*
,
int
);
void
(
*
set_vpp
)(
struct
map_info
*
,
int
);
...
@@ -353,7 +353,7 @@ static inline map_word map_word_ff(struct map_info *map)
...
@@ -353,7 +353,7 @@ static inline map_word map_word_ff(struct map_info *map)
{
{
map_word
r
;
map_word
r
;
int
i
;
int
i
;
if
(
map_bankwidth
(
map
)
<
MAP_FF_LIMIT
)
{
if
(
map_bankwidth
(
map
)
<
MAP_FF_LIMIT
)
{
int
bw
=
8
*
map_bankwidth
(
map
);
int
bw
=
8
*
map_bankwidth
(
map
);
r
.
x
[
0
]
=
(
1
<<
bw
)
-
1
;
r
.
x
[
0
]
=
(
1
<<
bw
)
-
1
;
...
...
include/linux/mtd/mtd.h
View file @
61ecfa87
/*
/*
* $Id: mtd.h,v 1.6
0 2005/08/06 04:40:42 nico
Exp $
* $Id: mtd.h,v 1.6
1 2005/11/07 11:14:54 gleixner
Exp $
*
*
* Copyright (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> et al.
* Copyright (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> et al.
*
*
...
@@ -90,13 +90,13 @@ struct mtd_info {
...
@@ -90,13 +90,13 @@ struct mtd_info {
// oobinfo is a nand_oobinfo structure, which can be set by iotcl (MEMSETOOBINFO)
// oobinfo is a nand_oobinfo structure, which can be set by iotcl (MEMSETOOBINFO)
struct
nand_oobinfo
oobinfo
;
struct
nand_oobinfo
oobinfo
;
u_int32_t
oobavail
;
// Number of bytes in OOB area available for fs
u_int32_t
oobavail
;
// Number of bytes in OOB area available for fs
/* Data for variable erase regions. If numeraseregions is zero,
/* Data for variable erase regions. If numeraseregions is zero,
* it means that the whole device has erasesize as given above.
* it means that the whole device has erasesize as given above.
*/
*/
int
numeraseregions
;
int
numeraseregions
;
struct
mtd_erase_region_info
*
eraseregions
;
struct
mtd_erase_region_info
*
eraseregions
;
/* This really shouldn't be here. It can go away in 2.5 */
/* This really shouldn't be here. It can go away in 2.5 */
u_int32_t
bank_size
;
u_int32_t
bank_size
;
...
@@ -119,10 +119,10 @@ struct mtd_info {
...
@@ -119,10 +119,10 @@ struct mtd_info {
int
(
*
read_oob
)
(
struct
mtd_info
*
mtd
,
loff_t
from
,
size_t
len
,
size_t
*
retlen
,
u_char
*
buf
);
int
(
*
read_oob
)
(
struct
mtd_info
*
mtd
,
loff_t
from
,
size_t
len
,
size_t
*
retlen
,
u_char
*
buf
);
int
(
*
write_oob
)
(
struct
mtd_info
*
mtd
,
loff_t
to
,
size_t
len
,
size_t
*
retlen
,
const
u_char
*
buf
);
int
(
*
write_oob
)
(
struct
mtd_info
*
mtd
,
loff_t
to
,
size_t
len
,
size_t
*
retlen
,
const
u_char
*
buf
);
/*
/*
* Methods to access the protection register area, present in some
* Methods to access the protection register area, present in some
* flash devices. The user data is one time programmable but the
* flash devices. The user data is one time programmable but the
* factory data is read only.
* factory data is read only.
*/
*/
int
(
*
get_fact_prot_info
)
(
struct
mtd_info
*
mtd
,
struct
otp_info
*
buf
,
size_t
len
);
int
(
*
get_fact_prot_info
)
(
struct
mtd_info
*
mtd
,
struct
otp_info
*
buf
,
size_t
len
);
int
(
*
read_fact_prot_reg
)
(
struct
mtd_info
*
mtd
,
loff_t
from
,
size_t
len
,
size_t
*
retlen
,
u_char
*
buf
);
int
(
*
read_fact_prot_reg
)
(
struct
mtd_info
*
mtd
,
loff_t
from
,
size_t
len
,
size_t
*
retlen
,
u_char
*
buf
);
...
@@ -133,14 +133,14 @@ struct mtd_info {
...
@@ -133,14 +133,14 @@ struct mtd_info {
/* kvec-based read/write methods. We need these especially for NAND flash,
/* kvec-based read/write methods. We need these especially for NAND flash,
with its limited number of write cycles per erase.
with its limited number of write cycles per erase.
NB: The 'count' parameter is the number of _vectors_, each of
NB: The 'count' parameter is the number of _vectors_, each of
which contains an (ofs, len) tuple.
which contains an (ofs, len) tuple.
*/
*/
int
(
*
readv
)
(
struct
mtd_info
*
mtd
,
struct
kvec
*
vecs
,
unsigned
long
count
,
loff_t
from
,
size_t
*
retlen
);
int
(
*
readv
)
(
struct
mtd_info
*
mtd
,
struct
kvec
*
vecs
,
unsigned
long
count
,
loff_t
from
,
size_t
*
retlen
);
int
(
*
readv_ecc
)
(
struct
mtd_info
*
mtd
,
struct
kvec
*
vecs
,
unsigned
long
count
,
loff_t
from
,
int
(
*
readv_ecc
)
(
struct
mtd_info
*
mtd
,
struct
kvec
*
vecs
,
unsigned
long
count
,
loff_t
from
,
size_t
*
retlen
,
u_char
*
eccbuf
,
struct
nand_oobinfo
*
oobsel
);
size_t
*
retlen
,
u_char
*
eccbuf
,
struct
nand_oobinfo
*
oobsel
);
int
(
*
writev
)
(
struct
mtd_info
*
mtd
,
const
struct
kvec
*
vecs
,
unsigned
long
count
,
loff_t
to
,
size_t
*
retlen
);
int
(
*
writev
)
(
struct
mtd_info
*
mtd
,
const
struct
kvec
*
vecs
,
unsigned
long
count
,
loff_t
to
,
size_t
*
retlen
);
int
(
*
writev_ecc
)
(
struct
mtd_info
*
mtd
,
const
struct
kvec
*
vecs
,
unsigned
long
count
,
loff_t
to
,
int
(
*
writev_ecc
)
(
struct
mtd_info
*
mtd
,
const
struct
kvec
*
vecs
,
unsigned
long
count
,
loff_t
to
,
size_t
*
retlen
,
u_char
*
eccbuf
,
struct
nand_oobinfo
*
oobsel
);
size_t
*
retlen
,
u_char
*
eccbuf
,
struct
nand_oobinfo
*
oobsel
);
/* Sync */
/* Sync */
...
@@ -204,7 +204,7 @@ int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs,
...
@@ -204,7 +204,7 @@ int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs,
#define MTD_WRITEECC(mtd, args...) (*(mtd->write_ecc))(mtd, args)
#define MTD_WRITEECC(mtd, args...) (*(mtd->write_ecc))(mtd, args)
#define MTD_READOOB(mtd, args...) (*(mtd->read_oob))(mtd, args)
#define MTD_READOOB(mtd, args...) (*(mtd->read_oob))(mtd, args)
#define MTD_WRITEOOB(mtd, args...) (*(mtd->write_oob))(mtd, args)
#define MTD_WRITEOOB(mtd, args...) (*(mtd->write_oob))(mtd, args)
#define MTD_SYNC(mtd) do { if (mtd->sync) (*(mtd->sync))(mtd); } while (0)
#define MTD_SYNC(mtd) do { if (mtd->sync) (*(mtd->sync))(mtd); } while (0)
#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_PARTITIONS
...
...
include/linux/mtd/nand.h
View file @
61ecfa87
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
* bat later if I did something naughty.
* bat later if I did something naughty.
* 10-11-2000 SJH Added private NAND flash structure for driver
* 10-11-2000 SJH Added private NAND flash structure for driver
* 10-24-2000 SJH Added prototype for 'nand_scan' function
* 10-24-2000 SJH Added prototype for 'nand_scan' function
* 10-29-2001 TG changed nand_chip structure to support
* 10-29-2001 TG changed nand_chip structure to support
* hardwarespecific function for accessing control lines
* hardwarespecific function for accessing control lines
* 02-21-2002 TG added support for different read/write adress and
* 02-21-2002 TG added support for different read/write adress and
* ready/busy line access function
* ready/busy line access function
...
@@ -36,21 +36,21 @@
...
@@ -36,21 +36,21 @@
* CONFIG_MTD_NAND_ECC_JFFS2 is not set
* CONFIG_MTD_NAND_ECC_JFFS2 is not set
* 08-10-2002 TG extensions to nand_chip structure to support HW-ECC
* 08-10-2002 TG extensions to nand_chip structure to support HW-ECC
*
*
* 08-29-2002 tglx nand_chip structure: data_poi for selecting
* 08-29-2002 tglx nand_chip structure: data_poi for selecting
* internal / fs-driver buffer
* internal / fs-driver buffer
* support for 6byte/512byte hardware ECC
* support for 6byte/512byte hardware ECC
* read_ecc, write_ecc extended for different oob-layout
* read_ecc, write_ecc extended for different oob-layout
* oob layout selections: NAND_NONE_OOB, NAND_JFFS2_OOB,
* oob layout selections: NAND_NONE_OOB, NAND_JFFS2_OOB,
* NAND_YAFFS_OOB
* NAND_YAFFS_OOB
* 11-25-2002 tglx Added Manufacturer code FUJITSU, NATIONAL
* 11-25-2002 tglx Added Manufacturer code FUJITSU, NATIONAL
* Split manufacturer and device ID structures
* Split manufacturer and device ID structures
*
*
* 02-08-2004 tglx added option field to nand structure for chip anomalities
* 02-08-2004 tglx added option field to nand structure for chip anomalities
* 05-25-2004 tglx added bad block table support, ST-MICRO manufacturer id
* 05-25-2004 tglx added bad block table support, ST-MICRO manufacturer id
* update of nand_chip structure description
* update of nand_chip structure description
* 01-17-2005 dmarlin added extended commands for AG-AND device and added option
* 01-17-2005 dmarlin added extended commands for AG-AND device and added option
* for BBT_AUTO_REFRESH.
* for BBT_AUTO_REFRESH.
* 01-20-2005 dmarlin added optional pointer to hardware specific callback for
* 01-20-2005 dmarlin added optional pointer to hardware specific callback for
* extra error status checks.
* extra error status checks.
*/
*/
#ifndef __LINUX_MTD_NAND_H
#ifndef __LINUX_MTD_NAND_H
...
@@ -120,8 +120,8 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
...
@@ -120,8 +120,8 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
#define NAND_CMD_CACHEDPROG 0x15
#define NAND_CMD_CACHEDPROG 0x15
/* Extended commands for AG-AND device */
/* Extended commands for AG-AND device */
/*
/*
* Note: the command for NAND_CMD_DEPLETE1 is really 0x00 but
* Note: the command for NAND_CMD_DEPLETE1 is really 0x00 but
* there is no way to distinguish that from NAND_CMD_READ0
* there is no way to distinguish that from NAND_CMD_READ0
* until the remaining sequence of commands has been completed
* until the remaining sequence of commands has been completed
* so add a high order bit and mask it off in the command.
* so add a high order bit and mask it off in the command.
...
@@ -145,7 +145,7 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
...
@@ -145,7 +145,7 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
#define NAND_STATUS_READY 0x40
#define NAND_STATUS_READY 0x40
#define NAND_STATUS_WP 0x80
#define NAND_STATUS_WP 0x80
/*
/*
* Constants for ECC_MODES
* Constants for ECC_MODES
*/
*/
...
@@ -191,12 +191,12 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
...
@@ -191,12 +191,12 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
#define NAND_CACHEPRG 0x00000008
#define NAND_CACHEPRG 0x00000008
/* Chip has copy back function */
/* Chip has copy back function */
#define NAND_COPYBACK 0x00000010
#define NAND_COPYBACK 0x00000010
/* AND Chip which has 4 banks and a confusing page / block
/* AND Chip which has 4 banks and a confusing page / block
* assignment. See Renesas datasheet for further information */
* assignment. See Renesas datasheet for further information */
#define NAND_IS_AND 0x00000020
#define NAND_IS_AND 0x00000020
/* Chip has a array of 4 pages which can be read without
/* Chip has a array of 4 pages which can be read without
* additional ready /busy waits */
* additional ready /busy waits */
#define NAND_4PAGE_ARRAY 0x00000040
#define NAND_4PAGE_ARRAY 0x00000040
/* Chip requires that BBT is periodically rewritten to prevent
/* Chip requires that BBT is periodically rewritten to prevent
* bits from adjacent blocks from 'leaking' in altering data.
* bits from adjacent blocks from 'leaking' in altering data.
* This happens with the Renesas AG-AND chips, possibly others. */
* This happens with the Renesas AG-AND chips, possibly others. */
...
@@ -219,8 +219,8 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
...
@@ -219,8 +219,8 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
/* Use a flash based bad block table. This option is passed to the
/* Use a flash based bad block table. This option is passed to the
* default bad block table function. */
* default bad block table function. */
#define NAND_USE_FLASH_BBT 0x00010000
#define NAND_USE_FLASH_BBT 0x00010000
/* The hw ecc generator provides a syndrome instead a ecc value on read
/* The hw ecc generator provides a syndrome instead a ecc value on read
* This can only work if we have the ecc bytes directly behind the
* This can only work if we have the ecc bytes directly behind the
* data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */
* data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */
#define NAND_HWECC_SYNDROME 0x00020000
#define NAND_HWECC_SYNDROME 0x00020000
/* This option skips the bbt scan during initialization. */
/* This option skips the bbt scan during initialization. */
...
@@ -252,7 +252,7 @@ struct nand_chip;
...
@@ -252,7 +252,7 @@ struct nand_chip;
/**
/**
* struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independend devices
* struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independend devices
* @lock: protection lock
* @lock: protection lock
* @active: the mtd device which holds the controller currently
* @active: the mtd device which holds the controller currently
* @wq: wait queue to sleep on if a NAND operation is in progress
* @wq: wait queue to sleep on if a NAND operation is in progress
* used instead of the per chip wait queue when a hw controller is available
* used instead of the per chip wait queue when a hw controller is available
...
@@ -265,8 +265,8 @@ struct nand_hw_control {
...
@@ -265,8 +265,8 @@ struct nand_hw_control {
/**
/**
* struct nand_chip - NAND Private Flash Chip Data
* struct nand_chip - NAND Private Flash Chip Data
* @IO_ADDR_R: [BOARDSPECIFIC] address to read the 8 I/O lines of the flash device
* @IO_ADDR_R: [BOARDSPECIFIC] address to read the 8 I/O lines of the flash device
* @IO_ADDR_W: [BOARDSPECIFIC] address to write the 8 I/O lines of the flash device
* @IO_ADDR_W: [BOARDSPECIFIC] address to write the 8 I/O lines of the flash device
* @read_byte: [REPLACEABLE] read one byte from the chip
* @read_byte: [REPLACEABLE] read one byte from the chip
* @write_byte: [REPLACEABLE] write one byte to the chip
* @write_byte: [REPLACEABLE] write one byte to the chip
* @read_word: [REPLACEABLE] read one word from the chip
* @read_word: [REPLACEABLE] read one word from the chip
...
@@ -289,7 +289,7 @@ struct nand_hw_control {
...
@@ -289,7 +289,7 @@ struct nand_hw_control {
* be provided if a hardware ECC is available
* be provided if a hardware ECC is available
* @erase_cmd: [INTERN] erase command write function, selectable due to AND support
* @erase_cmd: [INTERN] erase command write function, selectable due to AND support
* @scan_bbt: [REPLACEABLE] function to scan bad block table
* @scan_bbt: [REPLACEABLE] function to scan bad block table
* @eccmode: [BOARDSPECIFIC] mode of ecc, see defines
* @eccmode: [BOARDSPECIFIC] mode of ecc, see defines
* @eccsize: [INTERN] databytes used per ecc-calculation
* @eccsize: [INTERN] databytes used per ecc-calculation
* @eccbytes: [INTERN] number of ecc bytes per ecc-calculation step
* @eccbytes: [INTERN] number of ecc bytes per ecc-calculation step
* @eccsteps: [INTERN] number of ecc calculation steps per page
* @eccsteps: [INTERN] number of ecc calculation steps per page
...
@@ -301,7 +301,7 @@ struct nand_hw_control {
...
@@ -301,7 +301,7 @@ struct nand_hw_control {
* @phys_erase_shift: [INTERN] number of address bits in a physical eraseblock
* @phys_erase_shift: [INTERN] number of address bits in a physical eraseblock
* @bbt_erase_shift: [INTERN] number of address bits in a bbt entry
* @bbt_erase_shift: [INTERN] number of address bits in a bbt entry
* @chip_shift: [INTERN] number of address bits in one chip
* @chip_shift: [INTERN] number of address bits in one chip
* @data_buf: [INTERN] internal buffer for one page + oob
* @data_buf: [INTERN] internal buffer for one page + oob
* @oob_buf: [INTERN] oob buffer for one eraseblock
* @oob_buf: [INTERN] oob buffer for one eraseblock
* @oobdirty: [INTERN] indicates that oob_buf must be reinitialized
* @oobdirty: [INTERN] indicates that oob_buf must be reinitialized
* @data_poi: [INTERN] pointer to a data buffer
* @data_poi: [INTERN] pointer to a data buffer
...
@@ -316,22 +316,22 @@ struct nand_hw_control {
...
@@ -316,22 +316,22 @@ struct nand_hw_control {
* @bbt: [INTERN] bad block table pointer
* @bbt: [INTERN] bad block table pointer
* @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup
* @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup
* @bbt_md: [REPLACEABLE] bad block table mirror descriptor
* @bbt_md: [REPLACEABLE] bad block table mirror descriptor
* @badblock_pattern: [REPLACEABLE] bad block scan pattern used for initial bad block scan
* @badblock_pattern: [REPLACEABLE] bad block scan pattern used for initial bad block scan
* @controller: [OPTIONAL] a pointer to a hardware controller structure which is shared among multiple independend devices
* @controller: [OPTIONAL] a pointer to a hardware controller structure which is shared among multiple independend devices
* @priv: [OPTIONAL] pointer to private chip date
* @priv: [OPTIONAL] pointer to private chip date
* @errstat: [OPTIONAL] hardware specific function to perform additional error status checks
* @errstat: [OPTIONAL] hardware specific function to perform additional error status checks
* (determine if errors are correctable)
* (determine if errors are correctable)
*/
*/
struct
nand_chip
{
struct
nand_chip
{
void
__iomem
*
IO_ADDR_R
;
void
__iomem
*
IO_ADDR_R
;
void
__iomem
*
IO_ADDR_W
;
void
__iomem
*
IO_ADDR_W
;
u_char
(
*
read_byte
)(
struct
mtd_info
*
mtd
);
u_char
(
*
read_byte
)(
struct
mtd_info
*
mtd
);
void
(
*
write_byte
)(
struct
mtd_info
*
mtd
,
u_char
byte
);
void
(
*
write_byte
)(
struct
mtd_info
*
mtd
,
u_char
byte
);
u16
(
*
read_word
)(
struct
mtd_info
*
mtd
);
u16
(
*
read_word
)(
struct
mtd_info
*
mtd
);
void
(
*
write_word
)(
struct
mtd_info
*
mtd
,
u16
word
);
void
(
*
write_word
)(
struct
mtd_info
*
mtd
,
u16
word
);
void
(
*
write_buf
)(
struct
mtd_info
*
mtd
,
const
u_char
*
buf
,
int
len
);
void
(
*
write_buf
)(
struct
mtd_info
*
mtd
,
const
u_char
*
buf
,
int
len
);
void
(
*
read_buf
)(
struct
mtd_info
*
mtd
,
u_char
*
buf
,
int
len
);
void
(
*
read_buf
)(
struct
mtd_info
*
mtd
,
u_char
*
buf
,
int
len
);
int
(
*
verify_buf
)(
struct
mtd_info
*
mtd
,
const
u_char
*
buf
,
int
len
);
int
(
*
verify_buf
)(
struct
mtd_info
*
mtd
,
const
u_char
*
buf
,
int
len
);
...
@@ -396,7 +396,7 @@ struct nand_chip {
...
@@ -396,7 +396,7 @@ struct nand_chip {
* @name: Identify the device type
* @name: Identify the device type
* @id: device ID code
* @id: device ID code
* @pagesize: Pagesize in bytes. Either 256 or 512 or 0
* @pagesize: Pagesize in bytes. Either 256 or 512 or 0
* If the pagesize is 0, then the real pagesize
* If the pagesize is 0, then the real pagesize
* and the eraseize are determined from the
* and the eraseize are determined from the
* extended id bytes in the chip
* extended id bytes in the chip
* @erasesize: Size of an erase block in the flash device.
* @erasesize: Size of an erase block in the flash device.
...
@@ -425,7 +425,7 @@ struct nand_manufacturers {
...
@@ -425,7 +425,7 @@ struct nand_manufacturers {
extern
struct
nand_flash_dev
nand_flash_ids
[];
extern
struct
nand_flash_dev
nand_flash_ids
[];
extern
struct
nand_manufacturers
nand_manuf_ids
[];
extern
struct
nand_manufacturers
nand_manuf_ids
[];
/**
/**
* struct nand_bbt_descr - bad block table descriptor
* struct nand_bbt_descr - bad block table descriptor
* @options: options for this descriptor
* @options: options for this descriptor
* @pages: the page(s) where we find the bbt, used with option BBT_ABSPAGE
* @pages: the page(s) where we find the bbt, used with option BBT_ABSPAGE
...
@@ -436,14 +436,14 @@ extern struct nand_manufacturers nand_manuf_ids[];
...
@@ -436,14 +436,14 @@ extern struct nand_manufacturers nand_manuf_ids[];
* @version: version read from the bbt page during scan
* @version: version read from the bbt page during scan
* @len: length of the pattern, if 0 no pattern check is performed
* @len: length of the pattern, if 0 no pattern check is performed
* @maxblocks: maximum number of blocks to search for a bbt. This number of
* @maxblocks: maximum number of blocks to search for a bbt. This number of
* blocks is reserved at the end of the device where the tables are
* blocks is reserved at the end of the device where the tables are
* written.
* written.
* @reserved_block_code: if non-0, this pattern denotes a reserved (rather than
* @reserved_block_code: if non-0, this pattern denotes a reserved (rather than
* bad) block in the stored bbt
* bad) block in the stored bbt
* @pattern: pattern to identify bad block table or factory marked good /
* @pattern: pattern to identify bad block table or factory marked good /
* bad blocks, can be NULL, if len = 0
* bad blocks, can be NULL, if len = 0
*
*
* Descriptor for the bad block table marker and the descriptor for the
* Descriptor for the bad block table marker and the descriptor for the
* pattern which identifies good and bad blocks. The assumption is made
* pattern which identifies good and bad blocks. The assumption is made
* that the pattern and the version count are always located in the oob area
* that the pattern and the version count are always located in the oob area
* of the first block.
* of the first block.
...
...
include/linux/mtd/onenand.h
View file @
61ecfa87
...
@@ -77,7 +77,7 @@ struct onenand_bufferram {
...
@@ -77,7 +77,7 @@ struct onenand_bufferram {
* @param wq [INTERN] wait queue to sleep on if a OneNAND operation is in progress
* @param wq [INTERN] wait queue to sleep on if a OneNAND operation is in progress
* @param state [INTERN] the current state of the OneNAND device
* @param state [INTERN] the current state of the OneNAND device
* @param autooob [REPLACEABLE] the default (auto)placement scheme
* @param autooob [REPLACEABLE] the default (auto)placement scheme
* @param bbm [REPLACEABLE] pointer to Bad Block Management
* @param bbm [REPLACEABLE] pointer to Bad Block Management
* @param priv [OPTIONAL] pointer to private chip date
* @param priv [OPTIONAL] pointer to private chip date
*/
*/
struct
onenand_chip
{
struct
onenand_chip
{
...
...
include/linux/mtd/partitions.h
View file @
61ecfa87
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* This code is GPL
* This code is GPL
*
*
* $Id: partitions.h,v 1.1
6 2004/11/16 18:34:40 dwmw2
Exp $
* $Id: partitions.h,v 1.1
7 2005/11/07 11:14:55 gleixner
Exp $
*/
*/
#ifndef MTD_PARTITIONS_H
#ifndef MTD_PARTITIONS_H
...
@@ -16,25 +16,25 @@
...
@@ -16,25 +16,25 @@
/*
/*
* Partition definition structure:
* Partition definition structure:
*
*
* An array of struct partition is passed along with a MTD object to
* An array of struct partition is passed along with a MTD object to
* add_mtd_partitions() to create them.
* add_mtd_partitions() to create them.
*
*
* For each partition, these fields are available:
* For each partition, these fields are available:
* name: string that will be used to label the partition's MTD device.
* name: string that will be used to label the partition's MTD device.
* size: the partition size; if defined as MTDPART_SIZ_FULL, the partition
* size: the partition size; if defined as MTDPART_SIZ_FULL, the partition
* will extend to the end of the master MTD device.
* will extend to the end of the master MTD device.
* offset: absolute starting position within the master MTD device; if
* offset: absolute starting position within the master MTD device; if
* defined as MTDPART_OFS_APPEND, the partition will start where the
* defined as MTDPART_OFS_APPEND, the partition will start where the
* previous one ended; if MTDPART_OFS_NXTBLK, at the next erase block.
* previous one ended; if MTDPART_OFS_NXTBLK, at the next erase block.
* mask_flags: contains flags that have to be masked (removed) from the
* mask_flags: contains flags that have to be masked (removed) from the
* master MTD flag set for the corresponding MTD partition.
* master MTD flag set for the corresponding MTD partition.
* For example, to force a read-only partition, simply adding
* For example, to force a read-only partition, simply adding
* MTD_WRITEABLE to the mask_flags will do the trick.
* MTD_WRITEABLE to the mask_flags will do the trick.
*
*
* Note: writeable partitions require their size and offset be
* Note: writeable partitions require their size and offset be
* erasesize aligned (e.g. use MTDPART_OFS_NEXTBLK).
* erasesize aligned (e.g. use MTDPART_OFS_NEXTBLK).
*/
*/
struct
mtd_partition
{
struct
mtd_partition
{
char
*
name
;
/* identifier string */
char
*
name
;
/* identifier string */
...
@@ -66,7 +66,7 @@ struct mtd_part_parser {
...
@@ -66,7 +66,7 @@ struct mtd_part_parser {
extern
int
register_mtd_parser
(
struct
mtd_part_parser
*
parser
);
extern
int
register_mtd_parser
(
struct
mtd_part_parser
*
parser
);
extern
int
deregister_mtd_parser
(
struct
mtd_part_parser
*
parser
);
extern
int
deregister_mtd_parser
(
struct
mtd_part_parser
*
parser
);
extern
int
parse_mtd_partitions
(
struct
mtd_info
*
master
,
const
char
**
types
,
extern
int
parse_mtd_partitions
(
struct
mtd_info
*
master
,
const
char
**
types
,
struct
mtd_partition
**
pparts
,
unsigned
long
origin
);
struct
mtd_partition
**
pparts
,
unsigned
long
origin
);
#define put_partition_parser(p) do { module_put((p)->owner); } while(0)
#define put_partition_parser(p) do { module_put((p)->owner); } while(0)
...
...
include/linux/mtd/physmap.h
View file @
61ecfa87
/*
/*
* For boards with physically mapped flash and using
* For boards with physically mapped flash and using
* drivers/mtd/maps/physmap.c mapping driver.
* drivers/mtd/maps/physmap.c mapping driver.
*
*
* $Id: physmap.h,v 1.
3 2004/07/21 00:16:15 jwboy
er Exp $
* $Id: physmap.h,v 1.
4 2005/11/07 11:14:55 gleixn
er Exp $
*
*
* Copyright (C) 2003 MontaVista Software Inc.
* Copyright (C) 2003 MontaVista Software Inc.
* Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
* Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
#include <linux/config.h>
#include <linux/config.h>
#if defined(CONFIG_MTD_PHYSMAP)
#if defined(CONFIG_MTD_PHYSMAP)
#include <linux/mtd/mtd.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/map.h>
...
@@ -44,12 +44,12 @@ static inline void physmap_configure(unsigned long addr, unsigned long size, int
...
@@ -44,12 +44,12 @@ static inline void physmap_configure(unsigned long addr, unsigned long size, int
#if defined(CONFIG_MTD_PARTITIONS)
#if defined(CONFIG_MTD_PARTITIONS)
/*
/*
* Machines that wish to do flash partition may want to call this function in
* Machines that wish to do flash partition may want to call this function in
* their setup routine.
* their setup routine.
*
*
* physmap_set_partitions(mypartitions, num_parts);
* physmap_set_partitions(mypartitions, num_parts);
*
*
* Note that one can always override this hard-coded partition with
* Note that one can always override this hard-coded partition with
* command line partition (you need to enable CONFIG_MTD_CMDLINE_PARTS).
* command line partition (you need to enable CONFIG_MTD_CMDLINE_PARTS).
*/
*/
void
physmap_set_partitions
(
struct
mtd_partition
*
parts
,
int
num_parts
);
void
physmap_set_partitions
(
struct
mtd_partition
*
parts
,
int
num_parts
);
...
...
include/linux/mtd/pmc551.h
View file @
61ecfa87
/*
/*
* $Id: pmc551.h,v 1.
5 2003/01/24 16:49:53 dwmw2
Exp $
* $Id: pmc551.h,v 1.
6 2005/11/07 11:14:55 gleixner
Exp $
*
*
* PMC551 PCI Mezzanine Ram Device
* PMC551 PCI Mezzanine Ram Device
*
*
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Mark Ferrell
* Mark Ferrell
* Copyright 1999,2000 Nortel Networks
* Copyright 1999,2000 Nortel Networks
*
*
* License:
* License:
* As part of this driver was derrived from the slram.c driver it falls
* As part of this driver was derrived from the slram.c driver it falls
* under the same license, which is GNU General Public License v2
* under the same license, which is GNU General Public License v2
*/
*/
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/mtd.h>
#define PMC551_VERSION "$Id: pmc551.h,v 1.
5 2003/01/24 16:49:53 dwmw2
Exp $\n"\
#define PMC551_VERSION "$Id: pmc551.h,v 1.
6 2005/11/07 11:14:55 gleixner
Exp $\n"\
"Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n"
"Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n"
/*
/*
...
@@ -30,7 +30,7 @@ struct mypriv {
...
@@ -30,7 +30,7 @@ struct mypriv {
u32
curr_map0
;
u32
curr_map0
;
u32
asize
;
u32
asize
;
struct
mtd_info
*
nextpmc551
;
struct
mtd_info
*
nextpmc551
;
};
};
/*
/*
* Function Prototypes
* Function Prototypes
...
@@ -39,7 +39,7 @@ static int pmc551_erase(struct mtd_info *, struct erase_info *);
...
@@ -39,7 +39,7 @@ static int pmc551_erase(struct mtd_info *, struct erase_info *);
static
void
pmc551_unpoint
(
struct
mtd_info
*
,
u_char
*
,
loff_t
,
size_t
);
static
void
pmc551_unpoint
(
struct
mtd_info
*
,
u_char
*
,
loff_t
,
size_t
);
static
int
pmc551_point
(
struct
mtd_info
*
mtd
,
loff_t
from
,
size_t
len
,
size_t
*
retlen
,
u_char
**
mtdbuf
);
static
int
pmc551_point
(
struct
mtd_info
*
mtd
,
loff_t
from
,
size_t
len
,
size_t
*
retlen
,
u_char
**
mtdbuf
);
static
int
pmc551_read
(
struct
mtd_info
*
,
loff_t
,
size_t
,
size_t
*
,
u_char
*
);
static
int
pmc551_read
(
struct
mtd_info
*
,
loff_t
,
size_t
,
size_t
*
,
u_char
*
);
static
int
pmc551_write
(
struct
mtd_info
*
,
loff_t
,
size_t
,
size_t
*
,
const
u_char
*
);
static
int
pmc551_write
(
struct
mtd_info
*
,
loff_t
,
size_t
,
size_t
*
,
const
u_char
*
);
/*
/*
...
@@ -50,7 +50,7 @@ static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_cha
...
@@ -50,7 +50,7 @@ static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_cha
#endif
#endif
#ifndef PCI_DEVICE_ID_V3_SEMI_V370PDC
#ifndef PCI_DEVICE_ID_V3_SEMI_V370PDC
#define PCI_DEVICE_ID_V3_SEMI_V370PDC 0x0200
#define PCI_DEVICE_ID_V3_SEMI_V370PDC 0x0200
#endif
#endif
...
...
include/linux/mtd/xip.h
View file @
61ecfa87
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
* it under the terms of the GNU General Public License version 2 as
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* published by the Free Software Foundation.
*
*
* $Id: xip.h,v 1.
4 2005/10/17 21:03:16 nico
Exp $
* $Id: xip.h,v 1.
5 2005/11/07 11:14:55 gleixner
Exp $
*/
*/
#ifndef __LINUX_MTD_XIP_H__
#ifndef __LINUX_MTD_XIP_H__
...
@@ -60,9 +60,9 @@
...
@@ -60,9 +60,9 @@
* overflowing.
* overflowing.
*
*
* xip_iprefetch()
* xip_iprefetch()
*
*
* Macro to fill instruction prefetch
* Macro to fill instruction prefetch
* e.g. a series of nops: asm volatile (".rep 8; nop; .endr");
* e.g. a series of nops: asm volatile (".rep 8; nop; .endr");
*/
*/
#include <asm/mtd-xip.h>
#include <asm/mtd-xip.h>
...
...
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