nand.h 1.2 KB
Newer Older
1
/*
2
 * arch/arm/plat-omap/include/mach/nand.h
3 4 5 6 7 8 9 10 11 12
 *
 * 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 <linux/mtd/partitions.h>

13 14 15
enum nand_io {
	NAND_OMAP_PREFETCH_POLLED = 0,	/* prefetch polled mode, default */
	NAND_OMAP_POLLED,		/* polled mode, without prefetch */
16 17
	NAND_OMAP_PREFETCH_DMA,		/* prefetch enabled sDMA mode */
	NAND_OMAP_PREFETCH_IRQ		/* prefetch enabled irq mode */
18 19
};

20 21 22 23 24
struct omap_nand_platform_data {
	unsigned int		options;
	int			cs;
	int			gpio_irq;
	struct mtd_partition	*parts;
25
	struct gpmc_timings	*gpmc_t;
26
	int			nr_parts;
27
	int			(*nand_setup)(void);
28 29
	int			(*dev_ready)(struct omap_nand_platform_data *);
	int			dma_channel;
30
	int			gpmc_irq;
31
	enum nand_io		xfer_type;
32 33
	unsigned long		phys_base;
	int			devsize;
34
};
35

36 37
/* minimum size for IO mapping */
#define	NAND_IO_SIZE	4
38

39
#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
40
extern int gpmc_nand_init(struct omap_nand_platform_data *d);
41 42 43 44 45 46
#else
static inline int gpmc_nand_init(struct omap_nand_platform_data *d)
{
	return 0;
}
#endif