Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 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 | |
Juha Yrjola | aa62e90 | 2009-05-28 13:23:52 -0700 | [diff] [blame] | 12 | #include <linux/mtd/mtd.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 13 | #include <linux/mtd/partitions.h> |
| 14 | |
Juha Yrjola | aa62e90 | 2009-05-28 13:23:52 -0700 | [diff] [blame] | 15 | #define ONENAND_SYNC_READ (1 << 0) |
| 16 | #define ONENAND_SYNC_READWRITE (1 << 1) |
| 17 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 18 | struct omap_onenand_platform_data { |
| 19 | int cs; |
| 20 | int gpio_irq; |
| 21 | struct mtd_partition *parts; |
| 22 | int nr_parts; |
David Woodhouse | 742c525 | 2008-08-12 11:28:00 +0100 | [diff] [blame] | 23 | int (*onenand_setup)(void __iomem *, int freq); |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 24 | int dma_channel; |
Juha Yrjola | aa62e90 | 2009-05-28 13:23:52 -0700 | [diff] [blame] | 25 | u8 flags; |
Adrian Hunter | 9ac4e61 | 2010-02-19 15:39:53 +0100 | [diff] [blame^] | 26 | u8 regulator_can_sleep; |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 27 | }; |
David Woodhouse | 742c525 | 2008-08-12 11:28:00 +0100 | [diff] [blame] | 28 | |
David Woodhouse | 742c525 | 2008-08-12 11:28:00 +0100 | [diff] [blame] | 29 | #define ONENAND_MAX_PARTITIONS 8 |
Juha Yrjola | aa62e90 | 2009-05-28 13:23:52 -0700 | [diff] [blame] | 30 | |
| 31 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ |
| 32 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) |
| 33 | |
| 34 | extern void gpmc_onenand_init(struct omap_onenand_platform_data *d); |
| 35 | |
| 36 | #else |
| 37 | |
| 38 | #define board_onenand_data NULL |
| 39 | |
| 40 | static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d) |
| 41 | { |
| 42 | } |
| 43 | |
| 44 | #endif |