blob: ef9c60d4b29bc0a946e34bcd0fc457722869e1c7 [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)
Afzal Mohammedeb77b6a2012-10-05 11:39:54 +053017#define ONENAND_IN_OMAP34XX (1 << 2)
Juha Yrjolaaa62e902009-05-28 13:23:52 -070018
Russell Kinga09e64f2008-08-05 16:14:15 +010019struct omap_onenand_platform_data {
20 int cs;
21 int gpio_irq;
22 struct mtd_partition *parts;
23 int nr_parts;
Adrian Hunter3ad2d862011-02-07 10:46:59 +020024 int (*onenand_setup)(void __iomem *, int *freq_ptr);
Russell Kinga09e64f2008-08-05 16:14:15 +010025 int dma_channel;
Juha Yrjolaaa62e902009-05-28 13:23:52 -070026 u8 flags;
Adrian Hunter9ac4e612010-02-19 15:39:53 +010027 u8 regulator_can_sleep;
Roman Tereshonkovc93ff6b2011-02-17 13:44:42 +020028 u8 skip_initial_unlocking;
Russell Kinga09e64f2008-08-05 16:14:15 +010029};
David Woodhouse742c5252008-08-12 11:28:00 +010030
David Woodhouse742c5252008-08-12 11:28:00 +010031#define ONENAND_MAX_PARTITIONS 8
Juha Yrjolaaa62e902009-05-28 13:23:52 -070032
33#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
34 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
35
36extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
37
38#else
39
40#define board_onenand_data NULL
41
42static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
43{
44}
45
46#endif