blob: 72f433d7d827883250cfc1a034cb38e42d5d94a1 [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/*
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 Yrjolaaa62e902009-05-28 13:23:52 -070012#include <linux/mtd/mtd.h>
Russell Kinga09e64f2008-08-05 16:14:15 +010013#include <linux/mtd/partitions.h>
14
Juha Yrjolaaa62e902009-05-28 13:23:52 -070015#define ONENAND_SYNC_READ (1 << 0)
16#define ONENAND_SYNC_READWRITE (1 << 1)
17
Russell Kinga09e64f2008-08-05 16:14:15 +010018struct omap_onenand_platform_data {
19 int cs;
20 int gpio_irq;
21 struct mtd_partition *parts;
22 int nr_parts;
David Woodhouse742c5252008-08-12 11:28:00 +010023 int (*onenand_setup)(void __iomem *, int freq);
Russell Kinga09e64f2008-08-05 16:14:15 +010024 int dma_channel;
Juha Yrjolaaa62e902009-05-28 13:23:52 -070025 u8 flags;
Russell Kinga09e64f2008-08-05 16:14:15 +010026};
David Woodhouse742c5252008-08-12 11:28:00 +010027
David Woodhouse742c5252008-08-12 11:28:00 +010028#define ONENAND_MAX_PARTITIONS 8
Juha Yrjolaaa62e902009-05-28 13:23:52 -070029
30#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
31 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
32
33extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
34
35#else
36
37#define board_onenand_data NULL
38
39static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
40{
41}
42
43#endif