spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / arch / arm / plat-omap / include / plat / onenand.h
blob2858667d2e4f7505502c5e3a8317ff0bdfb4fbe6
1 /*
2 * arch/arm/plat-omap/include/mach/onenand.h
4 * Copyright (C) 2006 Nokia Corporation
5 * Author: Juha Yrjola
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.
12 #include <linux/mtd/mtd.h>
13 #include <linux/mtd/partitions.h>
15 #define ONENAND_SYNC_READ (1 << 0)
16 #define ONENAND_SYNC_READWRITE (1 << 1)
18 struct onenand_freq_info {
19 u16 maf_id;
20 u16 dev_id;
21 u16 ver_id;
24 struct omap_onenand_platform_data {
25 int cs;
26 int gpio_irq;
27 struct mtd_partition *parts;
28 int nr_parts;
29 int (*onenand_setup)(void __iomem *, int *freq_ptr);
30 int (*get_freq)(const struct onenand_freq_info *freq_info,
31 bool *clk_dep);
32 int dma_channel;
33 u8 flags;
34 u8 regulator_can_sleep;
35 u8 skip_initial_unlocking;
38 #define ONENAND_MAX_PARTITIONS 8
40 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
41 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
43 extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
45 #else
47 #define board_onenand_data NULL
49 static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
53 #endif