mtd: remove junk tabs in nand.h

Remove tabs between type and name.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
Sebastian Andrzej Siewior 2010-10-07 21:48:27 +02:00 committed by David Woodhouse
parent a0491fc4d4
commit b46daf7eb1

View File

@ -253,61 +253,62 @@ struct nand_chip;
struct nand_onfi_params { struct nand_onfi_params {
/* rev info and features block */ /* rev info and features block */
u8 sig[4]; /* 'O' 'N' 'F' 'I' */ /* 'O' 'N' 'F' 'I' */
__le16 revision; u8 sig[4];
__le16 features; __le16 revision;
__le16 opt_cmd; __le16 features;
u8 reserved[22]; __le16 opt_cmd;
u8 reserved[22];
/* manufacturer information block */ /* manufacturer information block */
char manufacturer[12]; char manufacturer[12];
char model[20]; char model[20];
u8 jedec_id; u8 jedec_id;
__le16 date_code; __le16 date_code;
u8 reserved2[13]; u8 reserved2[13];
/* memory organization block */ /* memory organization block */
__le32 byte_per_page; __le32 byte_per_page;
__le16 spare_bytes_per_page; __le16 spare_bytes_per_page;
__le32 data_bytes_per_ppage; __le32 data_bytes_per_ppage;
__le16 spare_bytes_per_ppage; __le16 spare_bytes_per_ppage;
__le32 pages_per_block; __le32 pages_per_block;
__le32 blocks_per_lun; __le32 blocks_per_lun;
u8 lun_count; u8 lun_count;
u8 addr_cycles; u8 addr_cycles;
u8 bits_per_cell; u8 bits_per_cell;
__le16 bb_per_lun; __le16 bb_per_lun;
__le16 block_endurance; __le16 block_endurance;
u8 guaranteed_good_blocks; u8 guaranteed_good_blocks;
__le16 guaranteed_block_endurance; __le16 guaranteed_block_endurance;
u8 programs_per_page; u8 programs_per_page;
u8 ppage_attr; u8 ppage_attr;
u8 ecc_bits; u8 ecc_bits;
u8 interleaved_bits; u8 interleaved_bits;
u8 interleaved_ops; u8 interleaved_ops;
u8 reserved3[13]; u8 reserved3[13];
/* electrical parameter block */ /* electrical parameter block */
u8 io_pin_capacitance_max; u8 io_pin_capacitance_max;
__le16 async_timing_mode; __le16 async_timing_mode;
__le16 program_cache_timing_mode; __le16 program_cache_timing_mode;
__le16 t_prog; __le16 t_prog;
__le16 t_bers; __le16 t_bers;
__le16 t_r; __le16 t_r;
__le16 t_ccs; __le16 t_ccs;
__le16 src_sync_timing_mode; __le16 src_sync_timing_mode;
__le16 src_ssync_features; __le16 src_ssync_features;
__le16 clk_pin_capacitance_typ; __le16 clk_pin_capacitance_typ;
__le16 io_pin_capacitance_typ; __le16 io_pin_capacitance_typ;
__le16 input_pin_capacitance_typ; __le16 input_pin_capacitance_typ;
u8 input_pin_capacitance_max; u8 input_pin_capacitance_max;
u8 driver_strenght_support; u8 driver_strenght_support;
__le16 t_int_r; __le16 t_int_r;
__le16 t_ald; __le16 t_ald;
u8 reserved4[7]; u8 reserved4[7];
/* vendor */ /* vendor */
u8 reserved5[90]; u8 reserved5[90];
__le16 crc; __le16 crc;
} __attribute__((packed)); } __attribute__((packed));
@ -323,7 +324,7 @@ struct nand_onfi_params {
* when a hw controller is available. * when a hw controller is available.
*/ */
struct nand_hw_control { struct nand_hw_control {
spinlock_t lock; spinlock_t lock;
struct nand_chip *active; struct nand_chip *active;
wait_queue_head_t wq; wait_queue_head_t wq;
}; };
@ -353,44 +354,33 @@ struct nand_hw_control {
* @write_oob: function to write chip OOB data * @write_oob: function to write chip OOB data
*/ */
struct nand_ecc_ctrl { struct nand_ecc_ctrl {
nand_ecc_modes_t mode; nand_ecc_modes_t mode;
int steps; int steps;
int size; int size;
int bytes; int bytes;
int total; int total;
int prepad; int prepad;
int postpad; int postpad;
struct nand_ecclayout *layout; struct nand_ecclayout *layout;
void (*hwctl)(struct mtd_info *mtd, int mode); void (*hwctl)(struct mtd_info *mtd, int mode);
int (*calculate)(struct mtd_info *mtd, int (*calculate)(struct mtd_info *mtd, const uint8_t *dat,
const uint8_t *dat, uint8_t *ecc_code);
uint8_t *ecc_code); int (*correct)(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc,
int (*correct)(struct mtd_info *mtd, uint8_t *dat, uint8_t *calc_ecc);
uint8_t *read_ecc, int (*read_page_raw)(struct mtd_info *mtd, struct nand_chip *chip,
uint8_t *calc_ecc); uint8_t *buf, int page);
int (*read_page_raw)(struct mtd_info *mtd, void (*write_page_raw)(struct mtd_info *mtd, struct nand_chip *chip,
struct nand_chip *chip, const uint8_t *buf);
uint8_t *buf, int page); int (*read_page)(struct mtd_info *mtd, struct nand_chip *chip,
void (*write_page_raw)(struct mtd_info *mtd, uint8_t *buf, int page);
struct nand_chip *chip, int (*read_subpage)(struct mtd_info *mtd, struct nand_chip *chip,
const uint8_t *buf); uint32_t offs, uint32_t len, uint8_t *buf);
int (*read_page)(struct mtd_info *mtd, void (*write_page)(struct mtd_info *mtd, struct nand_chip *chip,
struct nand_chip *chip, const uint8_t *buf);
uint8_t *buf, int page); int (*read_oob)(struct mtd_info *mtd, struct nand_chip *chip, int page,
int (*read_subpage)(struct mtd_info *mtd, int sndcmd);
struct nand_chip *chip, int (*write_oob)(struct mtd_info *mtd, struct nand_chip *chip,
uint32_t offs, uint32_t len, int page);
uint8_t *buf);
void (*write_page)(struct mtd_info *mtd,
struct nand_chip *chip,
const uint8_t *buf);
int (*read_oob)(struct mtd_info *mtd,
struct nand_chip *chip,
int page,
int sndcmd);
int (*write_oob)(struct mtd_info *mtd,
struct nand_chip *chip,
int page);
}; };
/** /**
@ -487,62 +477,55 @@ struct nand_buffers {
*/ */
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;
uint8_t (*read_byte)(struct mtd_info *mtd); uint8_t (*read_byte)(struct mtd_info *mtd);
u16 (*read_word)(struct mtd_info *mtd); u16 (*read_word)(struct mtd_info *mtd);
void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
int len); void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len);
void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int (*verify_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
int len); void (*select_chip)(struct mtd_info *mtd, int chip);
int (*verify_buf)(struct mtd_info *mtd, const uint8_t *buf, int (*block_bad)(struct mtd_info *mtd, loff_t ofs, int getchip);
int len); int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
void (*select_chip)(struct mtd_info *mtd, int chip); void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl);
int (*block_bad)(struct mtd_info *mtd, loff_t ofs, int (*init_size)(struct mtd_info *mtd, struct nand_chip *this,
int getchip); u8 *id_data);
int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); int (*dev_ready)(struct mtd_info *mtd);
void (*cmd_ctrl)(struct mtd_info *mtd, int dat, void (*cmdfunc)(struct mtd_info *mtd, unsigned command, int column,
unsigned int ctrl); int page_addr);
int (*init_size)(struct mtd_info *mtd, int(*waitfunc)(struct mtd_info *mtd, struct nand_chip *this);
struct nand_chip *this, u8 *id_data); void (*erase_cmd)(struct mtd_info *mtd, int page);
int (*dev_ready)(struct mtd_info *mtd); int (*scan_bbt)(struct mtd_info *mtd);
void (*cmdfunc)(struct mtd_info *mtd, unsigned command, int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state,
int column, int page_addr); int status, int page);
int (*waitfunc)(struct mtd_info *mtd, int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip,
struct nand_chip *this); const uint8_t *buf, int page, int cached, int raw);
void (*erase_cmd)(struct mtd_info *mtd, int page);
int (*scan_bbt)(struct mtd_info *mtd);
int (*errstat)(struct mtd_info *mtd, struct nand_chip *this,
int state, int status, int page);
int (*write_page)(struct mtd_info *mtd,
struct nand_chip *chip, const uint8_t *buf, int page,
int cached, int raw);
int chip_delay; int chip_delay;
unsigned int options; unsigned int options;
int page_shift; int page_shift;
int phys_erase_shift; int phys_erase_shift;
int bbt_erase_shift; int bbt_erase_shift;
int chip_shift; int chip_shift;
int numchips; int numchips;
uint64_t chipsize; uint64_t chipsize;
int pagemask; int pagemask;
int pagebuf; int pagebuf;
int subpagesize; int subpagesize;
uint8_t cellinfo; uint8_t cellinfo;
int badblockpos; int badblockpos;
int badblockbits; int badblockbits;
int onfi_version; int onfi_version;
struct nand_onfi_params onfi_params; struct nand_onfi_params onfi_params;
flstate_t state; flstate_t state;
uint8_t *oob_poi; uint8_t *oob_poi;
struct nand_hw_control *controller; struct nand_hw_control *controller;
struct nand_ecclayout *ecclayout; struct nand_ecclayout *ecclayout;
struct nand_ecc_ctrl ecc; struct nand_ecc_ctrl ecc;
struct nand_buffers *buffers; struct nand_buffers *buffers;
@ -550,13 +533,13 @@ struct nand_chip {
struct mtd_oob_ops ops; struct mtd_oob_ops ops;
uint8_t *bbt; uint8_t *bbt;
struct nand_bbt_descr *bbt_td; struct nand_bbt_descr *bbt_td;
struct nand_bbt_descr *bbt_md; struct nand_bbt_descr *bbt_md;
struct nand_bbt_descr *badblock_pattern; struct nand_bbt_descr *badblock_pattern;
void *priv; void *priv;
}; };
/* /*
@ -629,17 +612,16 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len,
* @priv: hardware controller specific settings * @priv: hardware controller specific settings
*/ */
struct platform_nand_chip { struct platform_nand_chip {
int nr_chips; int nr_chips;
int chip_offset; int chip_offset;
int nr_partitions; int nr_partitions;
struct mtd_partition *partitions; struct mtd_partition *partitions;
struct nand_ecclayout *ecclayout; struct nand_ecclayout *ecclayout;
int chip_delay; int chip_delay;
unsigned int options; unsigned int options;
const char **part_probe_types; const char **part_probe_types;
void (*set_parts)(uint64_t size, void (*set_parts)(uint64_t size, struct platform_nand_chip *chip);
struct platform_nand_chip *chip); void *priv;
void *priv;
}; };
/* Keep gcc happy */ /* Keep gcc happy */
@ -661,18 +643,15 @@ struct platform_device;
* All fields are optional and depend on the hardware driver requirements * All fields are optional and depend on the hardware driver requirements
*/ */
struct platform_nand_ctrl { struct platform_nand_ctrl {
int (*probe)(struct platform_device *pdev); int (*probe)(struct platform_device *pdev);
void (*remove)(struct platform_device *pdev); void (*remove)(struct platform_device *pdev);
void (*hwcontrol)(struct mtd_info *mtd, int cmd); void (*hwcontrol)(struct mtd_info *mtd, int cmd);
int (*dev_ready)(struct mtd_info *mtd); int (*dev_ready)(struct mtd_info *mtd);
void (*select_chip)(struct mtd_info *mtd, int chip); void (*select_chip)(struct mtd_info *mtd, int chip);
void (*cmd_ctrl)(struct mtd_info *mtd, int dat, void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl);
unsigned int ctrl); void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
void (*write_buf)(struct mtd_info *mtd, void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len);
const uint8_t *buf, int len); void *priv;
void (*read_buf)(struct mtd_info *mtd,
uint8_t *buf, int len);
void *priv;
}; };
/** /**
@ -681,8 +660,8 @@ struct platform_nand_ctrl {
* @ctrl: controller level device structure * @ctrl: controller level device structure
*/ */
struct platform_nand_data { struct platform_nand_data {
struct platform_nand_chip chip; struct platform_nand_chip chip;
struct platform_nand_ctrl ctrl; struct platform_nand_ctrl ctrl;
}; };
/* Some helpers to access the data structures */ /* Some helpers to access the data structures */