diff options
author | Javier Martinez Canillas <javier@dowhile0.org> | 2012-05-09 17:19:14 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-05-09 17:19:14 -0400 |
commit | 8259573b322ee87d4aad26d4a3ecb737b94da272 (patch) | |
tree | 50100018a75b9b66c7f356268f0f0fdd03da0d88 | |
parent | d61676b8f079d39808559e67c48a518fd14411ec (diff) |
ARM: OMAP2+: nand: Make board_onenand_init() visible to board code
board_onenand_init() and board_nand_init() initialization functions are
used to initialize OneNAND and NAND memories respectively. But only
board_nand_init() was visible to be used from board code. This patch makes
possible to initialize a OneNAND flash memory within platform code.
Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Acked-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Tested-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/board-flash.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-flash.h | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index 0349fd2b68d8..70a81f900bb5 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c | |||
@@ -87,7 +87,7 @@ static struct omap_onenand_platform_data board_onenand_data = { | |||
87 | .dma_channel = -1, /* disable DMA in OMAP OneNAND driver */ | 87 | .dma_channel = -1, /* disable DMA in OMAP OneNAND driver */ |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static void | 90 | void |
91 | __init board_onenand_init(struct mtd_partition *onenand_parts, | 91 | __init board_onenand_init(struct mtd_partition *onenand_parts, |
92 | u8 nr_parts, u8 cs) | 92 | u8 nr_parts, u8 cs) |
93 | { | 93 | { |
@@ -98,7 +98,7 @@ __init board_onenand_init(struct mtd_partition *onenand_parts, | |||
98 | gpmc_onenand_init(&board_onenand_data); | 98 | gpmc_onenand_init(&board_onenand_data); |
99 | } | 99 | } |
100 | #else | 100 | #else |
101 | static void | 101 | void |
102 | __init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs) | 102 | __init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs) |
103 | { | 103 | { |
104 | } | 104 | } |
diff --git a/arch/arm/mach-omap2/board-flash.h b/arch/arm/mach-omap2/board-flash.h index d25503a98417..c44b70d52021 100644 --- a/arch/arm/mach-omap2/board-flash.h +++ b/arch/arm/mach-omap2/board-flash.h | |||
@@ -47,3 +47,14 @@ static inline void board_nand_init(struct mtd_partition *nand_parts, | |||
47 | { | 47 | { |
48 | } | 48 | } |
49 | #endif | 49 | #endif |
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 | ||