Skip to content

Commit

Permalink
[MTD] includes: Clean up trailing white spaces
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
KAGA-KOKO authored and Thomas Gleixner committed Nov 7, 2005
1 parent 03ead84 commit 61ecfa8
Show file tree
Hide file tree
Showing 16 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion include/linux/mtd/bbm.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @param version version read from the bbt page during scan
* @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
* blocks is reserved at the end of the device
* blocks is reserved at the end of the device
* where the tables are written.
* @param reserved_block_code if non-0, this pattern denotes a reserved
* (rather than bad) block in the stored bbt
Expand Down
4 changes: 2 additions & 2 deletions include/linux/mtd/blktrans.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $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 <[email protected]>
*
Expand Down Expand Up @@ -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 add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);


#endif /* __MTD_TRANS_H__ */
24 changes: 12 additions & 12 deletions include/linux/mtd/cfi.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/* Common Flash Interface structures
/* Common Flash Interface structures
* See http://support.intel.com/design/flash/technote/index.htm
* $Id: cfi.h,v 1.55 2005/08/06 04:40:42 nico Exp $
* $Id: cfi.h,v 1.56 2005/11/07 11:14:54 gleixner Exp $
*/

#ifndef __MTD_CFI_H__
Expand Down Expand Up @@ -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
* device type (x8, x16, x32). Eg. a 32 bit device is 4 x 8 bytes.
/* 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.
* These numbers are used in calculations.
*/
#define CFI_DEVICETYPE_X8 (8 / 8)
Expand Down Expand Up @@ -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).
* 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)
{
Expand All @@ -268,7 +268,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
unsigned long onecmd;
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
an unsigned long, in the common case where that support is
disabled */
Expand All @@ -279,7 +279,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
wordwidth = map_bankwidth(map);
words_per_bus = 1;
}

chip_mode = map_bankwidth(map) / cfi_interleave(cfi);
chips_per_word = wordwidth * cfi_interleave(cfi) / map_bankwidth(map);

Expand All @@ -298,7 +298,7 @@ static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cf
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 */
switch (chips_per_word) {
default: BUG();
Expand All @@ -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 */
for (i=0; i < words_per_bus; i++) {
val.x[i] = onecmd;
Expand All @@ -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)


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)
{
int wordwidth, words_per_bus, chip_mode, chips_per_word;
unsigned long onestat, res = 0;
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
an unsigned long, in the common case where that support is
disabled */
Expand All @@ -343,7 +343,7 @@ static inline unsigned long cfi_merge_status(map_word val, struct map_info *map,
wordwidth = map_bankwidth(map);
words_per_bus = 1;
}

chip_mode = map_bankwidth(map) / cfi_interleave(cfi);
chips_per_word = wordwidth * cfi_interleave(cfi) / map_bankwidth(map);

Expand Down
18 changes: 9 additions & 9 deletions include/linux/mtd/doc2000.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
/*
* 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 <[email protected]>
* Copyright (C) 2002-2003 Greg Ungerer <[email protected]>
* Copyright (C) 2002-2003 SnapGear Inc
*
* $Id: doc2000.h,v 1.24 2005/01/05 12:40:38 dwmw2 Exp $
* $Id: doc2000.h,v 1.25 2005/11/07 11:14:54 gleixner Exp $
*
* Released under GPL
*/
Expand Down Expand Up @@ -75,10 +75,10 @@
#define DoC_Mplus_CtrlConfirm 0x1076
#define DoC_Mplus_Power 0x1fff

/* How to access the device?
* On ARM, it'll be mmap'd directly with 32-bit wide accesses.
/* How to access the device?
* On ARM, it'll be mmap'd directly with 32-bit wide accesses.
* On PPC, it's mmap'd and 16-bit wide.
* Others use readb/writeb
* Others use readb/writeb
*/
#if defined(__arm__)
#define ReadDOC_(adr, reg) ((unsigned char)(*(volatile __u32 *)(((unsigned long)adr)+((reg)<<2))))
Expand Down Expand Up @@ -172,18 +172,18 @@ struct DiskOnChip {
unsigned long totlen;
unsigned char ChipID; /* Type of DiskOnChip */
int ioreg;

unsigned long mfr; /* Flash IDs - only one type of flash per device */
unsigned long id;
int chipshift;
char page256;
char pageadrlen;
char interleave; /* Internal interleaving - Millennium Plus style */
unsigned long erasesize;

int curfloor;
int curchip;

int numchips;
struct Nand *chips;
struct mtd_info *nextdoc;
Expand Down
14 changes: 7 additions & 7 deletions include/linux/mtd/flashchip.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

/*
/*
* 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.
*
* $Id: flashchip.h,v 1.17 2005/03/14 18:27:15 bjd Exp $
* $Id: flashchip.h,v 1.18 2005/11/07 11:14:54 gleixner Exp $
*
*/

Expand All @@ -15,11 +15,11 @@

/* 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
* 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>

typedef enum {
typedef enum {
FL_READY,
FL_STATUS,
FL_CFI_QUERY,
Expand All @@ -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
the same physical chip when present. */

Expand Down
6 changes: 3 additions & 3 deletions include/linux/mtd/ftl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* $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):
* ftl.h 1.7 1999/10/25 20:23:17
*
Expand All @@ -12,7 +12,7 @@
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* 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
* <[email protected]>. Portions created by David A. Hinds
Expand Down
4 changes: 2 additions & 2 deletions include/linux/mtd/gen_probe.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* (C) 2001, 2001 Red Hat, Inc.
* 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__
#define __LINUX_MTD_GEN_PROBE_H__

#include <linux/mtd/flashchip.h>
#include <linux/mtd/map.h>
#include <linux/mtd/map.h>
#include <linux/mtd/cfi.h>
#include <linux/bitops.h>

Expand Down
20 changes: 10 additions & 10 deletions include/linux/mtd/jedec.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

/* 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.
* It is called JEDEC because the JEDEC association distributes the ID codes
* for the chips.
*
* 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__
Expand All @@ -33,16 +33,16 @@ struct jedec_flash_chip
__u16 jedec;
unsigned long size;
unsigned long sectorsize;

// *(__u8*)(base + (adder << addrshift)) = data << datashift
// Address size = size << addrshift
unsigned long base; // Byte 0 of the flash, will be unaligned
unsigned int datashift; // Useful for 32bit/16bit accesses
unsigned int addrshift;
unsigned long offset; // linerized start. base==offset for unbanked, uninterleaved flash

__u32 capabilities;

// These markers are filled in by the flash_chip_scan function
unsigned long start;
unsigned long length;
Expand All @@ -51,16 +51,16 @@ struct jedec_flash_chip
struct jedec_private
{
unsigned long size; // Total size of all the devices

/* 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
find the holes, but in the common symetric case
bank_fill[0] == bank_fill[*], thus addresses may be computed
find the holes, but in the common symetric case
bank_fill[0] == bank_fill[*], thus addresses may be computed
mathmatically. bank_fill must be powers of two */
unsigned is_banked;
unsigned long bank_fill[MAX_JEDEC_CHIPS];
struct jedec_flash_chip chips[MAX_JEDEC_CHIPS];

struct jedec_flash_chip chips[MAX_JEDEC_CHIPS];
};

#endif
14 changes: 7 additions & 7 deletions include/linux/mtd/map.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* Overhauled routines for dealing with different mmap regions of flash */
/* $Id: map.h,v 1.52 2005/05/25 10:29:41 gleixner Exp $ */
/* $Id: map.h,v 1.54 2005/11/07 11:14:54 gleixner Exp $ */

#ifndef __LINUX_MTD_MAP_H__
#define __LINUX_MTD_MAP_H__
Expand Down Expand Up @@ -170,14 +170,14 @@ typedef union {
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
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
it and register the partitions instead, or keep it for your own private
use; whatever.
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
mtd->priv->fldrv_priv field. This allows the map driver to get at
private data required by the chip driver is linked from the
mtd->priv->fldrv_priv field. This allows the map driver to get at
the destructor function map->fldrv_destroy() when it's tired
of living.
*/
Expand Down Expand Up @@ -214,7 +214,7 @@ struct map_info {
If there is no cache to care about this can be set to NULL. */
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. */
void (*set_vpp)(struct map_info *, int);

Expand Down Expand Up @@ -353,7 +353,7 @@ static inline map_word map_word_ff(struct map_info *map)
{
map_word r;
int i;

if (map_bankwidth(map) < MAP_FF_LIMIT) {
int bw = 8 * map_bankwidth(map);
r.x[0] = (1 << bw) - 1;
Expand Down
Loading

0 comments on commit 61ecfa8

Please sign in to comment.