arm: mach-omap2: n8x0: clean up dummy onenand init
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> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
committed by
Tony Lindgren
parent
7203f8a48b
commit
a1a92e6fcc
@@ -184,23 +184,15 @@ static struct mtd_partition onenand_partitions[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct omap_onenand_platform_data board_onenand_data = {
|
static struct omap_onenand_platform_data board_onenand_data[] = {
|
||||||
.cs = 0,
|
{
|
||||||
.gpio_irq = 26,
|
.cs = 0,
|
||||||
.parts = onenand_partitions,
|
.gpio_irq = 26,
|
||||||
.nr_parts = ARRAY_SIZE(onenand_partitions),
|
.parts = onenand_partitions,
|
||||||
.flags = ONENAND_SYNC_READ,
|
.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
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_MENELAUS) && \
|
#if defined(CONFIG_MENELAUS) && \
|
||||||
@@ -669,7 +661,7 @@ static void __init n8x0_init_machine(void)
|
|||||||
ARRAY_SIZE(n810_i2c_board_info_2));
|
ARRAY_SIZE(n810_i2c_board_info_2));
|
||||||
|
|
||||||
omap_serial_init();
|
omap_serial_init();
|
||||||
n8x0_onenand_init();
|
gpmc_onenand_init(board_onenand_data);
|
||||||
n8x0_mmc_init();
|
n8x0_mmc_init();
|
||||||
n8x0_usb_init();
|
n8x0_usb_init();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user