ARM: OMAP2+: onenand: connected soc info in pdata
[firefly-linux-kernel-4.4.55.git] / include / linux / platform_data / mtd-onenand-omap2.h
1 /*
2  * arch/arm/plat-omap/include/mach/onenand.h
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
12 #include <linux/mtd/mtd.h>
13 #include <linux/mtd/partitions.h>
14
15 #define ONENAND_SYNC_READ       (1 << 0)
16 #define ONENAND_SYNC_READWRITE  (1 << 1)
17 #define ONENAND_IN_OMAP34XX     (1 << 2)
18
19 struct omap_onenand_platform_data {
20         int                     cs;
21         int                     gpio_irq;
22         struct mtd_partition    *parts;
23         int                     nr_parts;
24         int                     (*onenand_setup)(void __iomem *, int *freq_ptr);
25         int                     dma_channel;
26         u8                      flags;
27         u8                      regulator_can_sleep;
28         u8                      skip_initial_unlocking;
29 };
30
31 #define ONENAND_MAX_PARTITIONS 8
32
33 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
34         defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
35
36 extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
37
38 #else
39
40 #define board_onenand_data      NULL
41
42 static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
43 {
44 }
45
46 #endif