Vimal Singh | c2798e9 | 2010-02-15 10:03:33 -0800 | [diff] [blame] | 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> |
Sukumar Ghorai | 13d6b73c | 2010-07-09 14:27:47 +0000 | [diff] [blame] | 15 | #include <plat/gpmc.h> |
| 16 | |
| 17 | #define PDC_NOR 1 |
| 18 | #define PDC_NAND 2 |
| 19 | #define PDC_ONENAND 3 |
| 20 | #define DBG_MPDB 4 |
Vimal Singh | c2798e9 | 2010-02-15 10:03:33 -0800 | [diff] [blame] | 21 | |
| 22 | struct flash_partitions { |
| 23 | struct mtd_partition *parts; |
| 24 | int nr_parts; |
| 25 | }; |
| 26 | |
Tony Lindgren | f8cf8e4 | 2011-09-20 15:57:39 -0700 | [diff] [blame] | 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) |
Sukumar Ghorai | 13d6b73c | 2010-07-09 14:27:47 +0000 | [diff] [blame] | 31 | extern void board_flash_init(struct flash_partitions [], |
Sukumar Ghorai | d5ce2b6 | 2011-01-28 15:42:03 +0530 | [diff] [blame] | 32 | char chip_sel[][GPMC_CS_NUM], int nand_type); |
Tony Lindgren | f8cf8e4 | 2011-09-20 15:57:39 -0700 | [diff] [blame] | 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) |
Manjunath Kondaiah G | 04aeae7 | 2010-10-08 09:58:35 -0700 | [diff] [blame] | 42 | extern void board_nand_init(struct mtd_partition *nand_parts, |
Sukumar Ghorai | d5ce2b6 | 2011-01-28 15:42:03 +0530 | [diff] [blame] | 43 | u8 nr_parts, u8 cs, int nand_type); |
Tony Lindgren | f8cf8e4 | 2011-09-20 15:57:39 -0700 | [diff] [blame] | 44 | #else |
| 45 | static inline void board_nand_init(struct mtd_partition *nand_parts, |
| 46 | u8 nr_parts, u8 cs, int nand_type) |
| 47 | { |
| 48 | } |
| 49 | #endif |
Javier Martinez Canillas | 8259573 | 2012-05-09 14:19:14 -0700 | [diff] [blame] | 50 | |
| 51 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ |
| 52 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) |
| 53 | extern void board_onenand_init(struct mtd_partition *nand_parts, |
| 54 | u8 nr_parts, u8 cs); |
| 55 | #else |
| 56 | static inline void board_onenand_init(struct mtd_partition *nand_parts, |
| 57 | u8 nr_parts, u8 cs) |
| 58 | { |
| 59 | } |
| 60 | #endif |