@@ -517,8 +517,16 @@ static void __init beagle_opp_init(void)
return;
}
+static struct gpmc_device_pdata *gpmc_device_data[1];
+
+static struct gpmc_pdata gpmc_data = {
+ .device_pdata = gpmc_device_data,
+};
+
static void __init omap3_beagle_init(void)
{
+ struct omap_nand_platform_data *nand_data;
+
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3_beagle_init_rev();
@@ -543,9 +551,17 @@ static void __init omap3_beagle_init(void)
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
- board_nand_init(omap3beagle_nand_partitions,
+ nand_data = board_nand_init(omap3beagle_nand_partitions,
ARRAY_SIZE(omap3beagle_nand_partitions), GPMC_CS_NUM,
NAND_BUSWIDTH_16, NULL);
+ if (nand_data != NULL) {
+ *gpmc_device_data = gpmc_nand_init(nand_data);
+ if (*gpmc_device_data)
+ gpmc_data.num_device++;
+ } else
+ pr_err("error: %s: nand init\n", __func__);
+
+ omap_init_gpmc(&gpmc_data);
/* Ensure msecure is mux'd to be able to set the RTC. */
omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH);
gpmc code has been converted to driver. Modify the board code to provide gpmc driver with required information Signed-off-by: Afzal Mohammed <afzal@ti.com> --- arch/arm/mach-omap2/board-omap3beagle.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)