blob: 2fb5d41a9fae2679781a9c759913a032b1a69e9e [file] [log] [blame]
Vimal Singhc2798e92010-02-15 10:03:33 -08001/*
2 * board-sdp.h
3 *
4 * Information structures for SDP-specific board config data
5 *
6 * Copyright (C) 2009 Nokia Corporation
7 * Copyright (C) 2009 Texas Instruments
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#include <linux/mtd/mtd.h>
14#include <linux/mtd/partitions.h>
Afzal Mohammed3ef5d002012-10-05 10:37:27 +053015#include "gpmc.h"
Sukumar Ghorai13d6b73c2010-07-09 14:27:47 +000016
17#define PDC_NOR 1
18#define PDC_NAND 2
19#define PDC_ONENAND 3
20#define DBG_MPDB 4
Vimal Singhc2798e92010-02-15 10:03:33 -080021
22struct flash_partitions {
23 struct mtd_partition *parts;
24 int nr_parts;
25};
26
Tony Lindgrenf8cf8e42011-09-20 15:57:39 -070027#if defined(CONFIG_MTD_NAND_OMAP2) || \
28 defined(CONFIG_MTD_NAND_OMAP2_MODULE) || \
29 defined(CONFIG_MTD_ONENAND_OMAP2) || \
30 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
Sukumar Ghorai13d6b73c2010-07-09 14:27:47 +000031extern void board_flash_init(struct flash_partitions [],
Sukumar Ghoraid5ce2b62011-01-28 15:42:03 +053032 char chip_sel[][GPMC_CS_NUM], int nand_type);
Tony Lindgrenf8cf8e42011-09-20 15:57:39 -070033#else
34static inline void board_flash_init(struct flash_partitions part[],
35 char chip_sel[][GPMC_CS_NUM], int nand_type)
36{
37}
38#endif
39
40#if defined(CONFIG_MTD_NAND_OMAP2) || \
41 defined(CONFIG_MTD_NAND_OMAP2_MODULE)
Manjunath Kondaiah G04aeae72010-10-08 09:58:35 -070042extern void board_nand_init(struct mtd_partition *nand_parts,
Afzal Mohammed2e618262012-02-29 18:11:56 +053043 u8 nr_parts, u8 cs, int nand_type, struct gpmc_timings *gpmc_t);
44extern struct gpmc_timings nand_default_timings[];
Tony Lindgrenf8cf8e42011-09-20 15:57:39 -070045#else
46static inline void board_nand_init(struct mtd_partition *nand_parts,
Afzal Mohammed2e618262012-02-29 18:11:56 +053047 u8 nr_parts, u8 cs, int nand_type, struct gpmc_timings *gpmc_t)
Tony Lindgrenf8cf8e42011-09-20 15:57:39 -070048{
49}
Afzal Mohammed2e618262012-02-29 18:11:56 +053050#define nand_default_timings NULL
Tony Lindgrenf8cf8e42011-09-20 15:57:39 -070051#endif
Javier Martinez Canillas82595732012-05-09 14:19:14 -070052
53#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
54 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
55extern void board_onenand_init(struct mtd_partition *nand_parts,
56 u8 nr_parts, u8 cs);
57#else
58static inline void board_onenand_init(struct mtd_partition *nand_parts,
59 u8 nr_parts, u8 cs)
60{
61}
62#endif