@@ -306,11 +306,8 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr)
return ret;
}
-int gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
+int gpmc_omap_onenand_init(struct omap_onenand_platform_data *_onenand_data)
{
- int err;
- struct device *dev = &gpmc_onenand_device.dev;
-
gpmc_onenand_data = _onenand_data;
gpmc_onenand_data->onenand_setup = gpmc_onenand_setup;
gpmc_onenand_device.dev.platform_data = gpmc_onenand_data;
@@ -320,6 +317,17 @@ int gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
else
gpmc_onenand_data->flags &= ~ONENAND_IN_OMAP34XX;
+ return 0;
+
+}
+
+int gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
+{
+ int err;
+ struct device *dev = &gpmc_onenand_device.dev;
+
+ gpmc_omap_onenand_init(_onenand_data);
+
err = gpmc_cs_request(gpmc_onenand_data->cs, ONENAND_IO_SIZE,
(unsigned long *)&gpmc_onenand_resource.start);
if (err < 0) {
Signed-off-by: Ladislav Michl <ladis@linux-mips.org> --- arch/arm/mach-omap2/gpmc-onenand.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)