summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/onenand.h
blob: 2858667d2e4f7505502c5e3a8317ff0bdfb4fbe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * arch/arm/plat-omap/include/mach/onenand.h
 *
 * Copyright (C) 2006 Nokia Corporation
 * Author: Juha Yrjola
 *
 * 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/mtd.h>
#include <linux/mtd/partitions.h>

#define ONENAND_SYNC_READ	(1 << 0)
#define ONENAND_SYNC_READWRITE	(1 << 1)

struct onenand_freq_info {
	u16			maf_id;
	u16			dev_id;
	u16			ver_id;
};

struct omap_onenand_platform_data {
	int			cs;
	int			gpio_irq;
	struct mtd_partition	*parts;
	int			nr_parts;
	int			(*onenand_setup)(void __iomem *, int *freq_ptr);
	int		(*get_freq)(const struct onenand_freq_info *freq_info,
				    bool *clk_dep);
	int			dma_channel;
	u8			flags;
	u8			regulator_can_sleep;
	u8			skip_initial_unlocking;
};

#define ONENAND_MAX_PARTITIONS 8

#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
	defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)

extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);

#else

#define board_onenand_data	NULL

static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
{
}

#endif
OpenPOWER on IntegriCloud