mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-25 20:14:25 +08:00
7a559c7882
omap_nand_platform_data fields 'options', 'gpio_irq', 'nand_setup' and 'dma_channel' are never referenced by the NAND driver, yet various board files are initializing those fields. This is both incorrect and confusing, so remove them. This allows to get rid of a global variable in gpmc-nand.c. This also corrects an issue where some boards are trying to pass NAND 16bit flag through .options, but the driver is using .devsize instead and ignoring .options. Finally, .dev_ready is treated as a flag by the driver, so make it bool instead of a function pointer. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
/*
|
|
* arch/arm/plat-omap/include/mach/nand.h
|
|
*
|
|
* Copyright (C) 2006 Micron Technology Inc.
|
|
*
|
|
* 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
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#include <plat/gpmc.h>
|
|
#include <linux/mtd/partitions.h>
|
|
|
|
enum nand_io {
|
|
NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */
|
|
NAND_OMAP_POLLED, /* polled mode, without prefetch */
|
|
NAND_OMAP_PREFETCH_DMA, /* prefetch enabled sDMA mode */
|
|
NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */
|
|
};
|
|
|
|
struct omap_nand_platform_data {
|
|
int cs;
|
|
struct mtd_partition *parts;
|
|
struct gpmc_timings *gpmc_t;
|
|
int nr_parts;
|
|
bool dev_ready;
|
|
int gpmc_irq;
|
|
enum nand_io xfer_type;
|
|
unsigned long phys_base;
|
|
int devsize;
|
|
enum omap_ecc ecc_opt;
|
|
};
|
|
|
|
/* minimum size for IO mapping */
|
|
#define NAND_IO_SIZE 4
|
|
|
|
#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
|
|
extern int gpmc_nand_init(struct omap_nand_platform_data *d);
|
|
#else
|
|
static inline int gpmc_nand_init(struct omap_nand_platform_data *d)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|