* [PATCH 1/2] arm: mach-omap2: n8x0: clean up dummy onenand init
@ 2010-12-02 15:51 Aaro Koskinen
2010-12-02 15:51 ` [PATCH 2/2] arm: mach-omap2: rx51: " Aaro Koskinen
2010-12-03 1:10 ` [PATCH 1/2] arm: mach-omap2: n8x0: " Tony Lindgren
0 siblings, 2 replies; 3+ messages in thread
From: Aaro Koskinen @ 2010-12-02 15:51 UTC (permalink / raw)
To: linux-arm-kernel
When OneNAND support is disabled, the platform code defines NULL
board_onenand_data and empty init function for us. By utilizing this we
can avoid cluttering board files with dummy definitions/wrappers.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
arch/arm/mach-omap2/board-n8x0.c | 26 +++++++++-----------------
1 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index dd353ff..0a4bc77 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -184,23 +184,15 @@ static struct mtd_partition onenand_partitions[] = {
},
};
-static struct omap_onenand_platform_data board_onenand_data = {
- .cs = 0,
- .gpio_irq = 26,
- .parts = onenand_partitions,
- .nr_parts = ARRAY_SIZE(onenand_partitions),
- .flags = ONENAND_SYNC_READ,
+static struct omap_onenand_platform_data board_onenand_data[] = {
+ {
+ .cs = 0,
+ .gpio_irq = 26,
+ .parts = onenand_partitions,
+ .nr_parts = ARRAY_SIZE(onenand_partitions),
+ .flags = ONENAND_SYNC_READ,
+ }
};
-
-static void __init n8x0_onenand_init(void)
-{
- gpmc_onenand_init(&board_onenand_data);
-}
-
-#else
-
-static void __init n8x0_onenand_init(void) {}
-
#endif
#if defined(CONFIG_MENELAUS) && \
@@ -669,7 +661,7 @@ static void __init n8x0_init_machine(void)
ARRAY_SIZE(n810_i2c_board_info_2));
omap_serial_init();
- n8x0_onenand_init();
+ gpmc_onenand_init(board_onenand_data);
n8x0_mmc_init();
n8x0_usb_init();
}
--
1.5.6.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] arm: mach-omap2: rx51: clean up dummy onenand init
2010-12-02 15:51 [PATCH 1/2] arm: mach-omap2: n8x0: clean up dummy onenand init Aaro Koskinen
@ 2010-12-02 15:51 ` Aaro Koskinen
2010-12-03 1:10 ` [PATCH 1/2] arm: mach-omap2: n8x0: " Tony Lindgren
1 sibling, 0 replies; 3+ messages in thread
From: Aaro Koskinen @ 2010-12-02 15:51 UTC (permalink / raw)
To: linux-arm-kernel
When OneNAND support is disabled, the platform code defines NULL
board_onenand_data and empty init function for us. By utilizing this we
can avoid cluttering board files with dummy definitions/wrappers.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
arch/arm/mach-omap2/board-rx51-peripherals.c | 28 ++++++++-----------------
1 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 3fec4d6..14a6fbd 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -815,25 +815,15 @@ static struct mtd_partition onenand_partitions[] = {
},
};
-static struct omap_onenand_platform_data board_onenand_data = {
- .cs = 0,
- .gpio_irq = 65,
- .parts = onenand_partitions,
- .nr_parts = ARRAY_SIZE(onenand_partitions),
- .flags = ONENAND_SYNC_READWRITE,
+static struct omap_onenand_platform_data board_onenand_data[] = {
+ {
+ .cs = 0,
+ .gpio_irq = 65,
+ .parts = onenand_partitions,
+ .nr_parts = ARRAY_SIZE(onenand_partitions),
+ .flags = ONENAND_SYNC_READWRITE,
+ }
};
-
-static void __init board_onenand_init(void)
-{
- gpmc_onenand_init(&board_onenand_data);
-}
-
-#else
-
-static inline void board_onenand_init(void)
-{
-}
-
#endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
@@ -916,7 +906,7 @@ error:
void __init rx51_peripherals_init(void)
{
rx51_i2c_init();
- board_onenand_init();
+ gpmc_onenand_init(board_onenand_data);
board_smc91x_init();
rx51_add_gpio_keys();
rx51_init_wl1251();
--
1.5.6.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 1/2] arm: mach-omap2: n8x0: clean up dummy onenand init
2010-12-02 15:51 [PATCH 1/2] arm: mach-omap2: n8x0: clean up dummy onenand init Aaro Koskinen
2010-12-02 15:51 ` [PATCH 2/2] arm: mach-omap2: rx51: " Aaro Koskinen
@ 2010-12-03 1:10 ` Tony Lindgren
1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2010-12-03 1:10 UTC (permalink / raw)
To: linux-arm-kernel
* Aaro Koskinen <aaro.koskinen@nokia.com> [101202 07:40]:
> When OneNAND support is disabled, the platform code defines NULL
> board_onenand_data and empty init function for us. By utilizing this we
> can avoid cluttering board files with dummy definitions/wrappers.
Applying these too.
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-03 1:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-02 15:51 [PATCH 1/2] arm: mach-omap2: n8x0: clean up dummy onenand init Aaro Koskinen
2010-12-02 15:51 ` [PATCH 2/2] arm: mach-omap2: rx51: " Aaro Koskinen
2010-12-03 1:10 ` [PATCH 1/2] arm: mach-omap2: n8x0: " Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).