diff options
Diffstat (limited to 'arch/arm/mach-omap2/gpmc-nand.c')
-rw-r--r-- | arch/arm/mach-omap2/gpmc-nand.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 8ad210bda9a..c1791d08ae5 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c @@ -20,6 +20,8 @@ #include <plat/board.h> #include <plat/gpmc.h> +static struct omap_nand_platform_data *gpmc_nand_data; + static struct resource gpmc_nand_resource = { .flags = IORESOURCE_MEM, }; @@ -31,7 +33,7 @@ static struct platform_device gpmc_nand_device = { .resource = &gpmc_nand_resource, }; -static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data) +static int omap2_nand_gpmc_retime(void) { struct gpmc_timings t; int err; @@ -81,11 +83,13 @@ static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data return 0; } -int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data) +int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data) { int err = 0; struct device *dev = &gpmc_nand_device.dev; + gpmc_nand_data = _nand_data; + gpmc_nand_data->nand_setup = omap2_nand_gpmc_retime; gpmc_nand_device.dev.platform_data = gpmc_nand_data; err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE, @@ -96,7 +100,7 @@ int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data) } /* Set timings in GPMC */ - err = omap2_nand_gpmc_retime(gpmc_nand_data); + err = omap2_nand_gpmc_retime(); if (err < 0) { dev_err(dev, "Unable to set gpmc timings: %d\n", err); return err; |