Merge branches 'for-2639/i2c/i2c-ce4100-v6', 'for-2639/i2c/i2c-eg20t-v3' and 'for...
[linux-2.6-block.git] / arch / arm / plat-omap / include / plat / onenand.h
CommitLineData
8777297b 1/*
a09e64fb 2 * arch/arm/plat-omap/include/mach/onenand.h
8777297b
KS
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 * Author: Juha Yrjola
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
aa62e90f 12#include <linux/mtd/mtd.h>
8777297b
KS
13#include <linux/mtd/partitions.h>
14
aa62e90f
JY
15#define ONENAND_SYNC_READ (1 << 0)
16#define ONENAND_SYNC_READWRITE (1 << 1)
17
5714b7ed
AH
18struct onenand_freq_info {
19 u16 maf_id;
20 u16 dev_id;
21 u16 ver_id;
22};
23
8777297b
KS
24struct omap_onenand_platform_data {
25 int cs;
26 int gpio_irq;
27 struct mtd_partition *parts;
28 int nr_parts;
3ad2d861 29 int (*onenand_setup)(void __iomem *, int *freq_ptr);
5714b7ed
AH
30 int (*get_freq)(const struct onenand_freq_info *freq_info,
31 bool *clk_dep);
8777297b 32 int dma_channel;
aa62e90f 33 u8 flags;
9ac4e613 34 u8 regulator_can_sleep;
8777297b 35};
36cd4fb5 36
36cd4fb5 37#define ONENAND_MAX_PARTITIONS 8
aa62e90f
JY
38
39#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
40 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
41
42extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
43
44#else
45
46#define board_onenand_data NULL
47
48static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
49{
50}
51
52#endif