Commit | Line | Data |
---|---|---|
c2798e93 VS |
1 | /* |
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> | |
3ef5d007 | 15 | #include "gpmc.h" |
13d6b73c SG |
16 | |
17 | #define PDC_NOR 1 | |
18 | #define PDC_NAND 2 | |
19 | #define PDC_ONENAND 3 | |
20 | #define DBG_MPDB 4 | |
c2798e93 VS |
21 | |
22 | struct flash_partitions { | |
23 | struct mtd_partition *parts; | |
24 | int nr_parts; | |
25 | }; | |
26 | ||
f8cf8e47 TL |
27 | #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) | |
13d6b73c | 31 | extern void board_flash_init(struct flash_partitions [], |
d5ce2b65 | 32 | char chip_sel[][GPMC_CS_NUM], int nand_type); |
f8cf8e47 TL |
33 | #else |
34 | static 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) | |
04aeae77 | 42 | extern void board_nand_init(struct mtd_partition *nand_parts, |
2e618261 AM |
43 | u8 nr_parts, u8 cs, int nand_type, struct gpmc_timings *gpmc_t); |
44 | extern struct gpmc_timings nand_default_timings[]; | |
f8cf8e47 TL |
45 | #else |
46 | static inline void board_nand_init(struct mtd_partition *nand_parts, | |
2e618261 | 47 | u8 nr_parts, u8 cs, int nand_type, struct gpmc_timings *gpmc_t) |
f8cf8e47 TL |
48 | { |
49 | } | |
2e618261 | 50 | #define nand_default_timings NULL |
f8cf8e47 | 51 | #endif |
8259573b JMC |
52 | |
53 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | |
54 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) | |
55 | extern void board_onenand_init(struct mtd_partition *nand_parts, | |
56 | u8 nr_parts, u8 cs); | |
57 | #else | |
58 | static inline void board_onenand_init(struct mtd_partition *nand_parts, | |
59 | u8 nr_parts, u8 cs) | |
60 | { | |
61 | } | |
62 | #endif |