OneNAND: Remove OMAP platform driver
authorKyungmin Park <kyungmin.park@samsung.com>
Fri, 9 Sep 2005 06:43:16 +0000 (07:43 +0100)
committerThomas Gleixner <tglx@mtd.linutronix.de>
Sun, 6 Nov 2005 20:35:12 +0000 (21:35 +0100)
Now we can use the generic platform driver

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/mtd/onenand/Kconfig
drivers/mtd/onenand/Makefile
drivers/mtd/onenand/omap-onenand.c [deleted file]

index 666ad3217730f50bbb356a692beb26204ebaf558..fa5045c9d6e7c8d9499be4b3220888dbb210162e 100644 (file)
@@ -30,12 +30,6 @@ config MTD_ONENAND_GENERIC
          Support for OneNAND flash on generic board. Using device driver
          framework, now all most platfrom are support.
 
-config MTD_ONENAND_OMAP
-       tristate "OneNAND Flash device on OMAP board"
-       depends on ARCH_OMAP && MTD_ONENAND
-       help
-         Support for OneNAND flash on TI OMAP board.
-
 config MTD_ONENAND_SYNC_READ
        bool "OneNAND Sync. Burst Read Support"
        depends on ARCH_OMAP
index e2a96549fcd80994d701b9ca8114cfe23f7518ab..4d2eacfd7e11a761c3cec319f34c735d0fc0222b 100644 (file)
@@ -7,7 +7,6 @@ obj-$(CONFIG_MTD_ONENAND)               += onenand.o
 
 # Board specific.
 obj-$(CONFIG_MTD_ONENAND_GENERIC)      += generic.o
-obj-$(CONFIG_MTD_ONENAND_OMAP)         += omap-onenand.o
 
 # Simulator
 obj-$(CONFIG_MTD_ONENAND_SIM)          += onenand_sim.o
diff --git a/drivers/mtd/onenand/omap-onenand.c b/drivers/mtd/onenand/omap-onenand.c
deleted file mode 100644 (file)
index 57e69f1..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- *  linux/drivers/mtd/onenand/omap-onenand.c
- *
- *  Copyright (c) 2005 Samsung Electronics
- *  Kyungmin Park <kyungmin.park@samsung.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Overview:
- *   This is a device driver for the OneNAND flash for OMAP boards.
- */
-
-#include <linux/device.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/onenand.h>
-#include <linux/mtd/partitions.h>
-
-#include <asm/io.h>
-#include <asm/mach/flash.h>
-
-#define DRIVER_NAME    "onenand"
-
-
-#ifdef CONFIG_MTD_PARTITIONS
-static const char *part_probes[] = { "cmdlinepart", NULL,  };
-#endif
-
-struct omap_onenand_info {
-       struct mtd_info         mtd;
-       struct mtd_partition    *parts;
-       struct onenand_chip     onenand;
-};
-
-static int __devinit omap_onenand_probe(struct device *dev)
-{
-       struct omap_onenand_info *info;
-       struct platform_device *pdev = to_platform_device(dev);
-       struct onenand_platform_data *pdata = pdev->dev.platform_data;
-       struct resource *res = pdev->resource;
-       unsigned long size = res->end - res->start + 1;
-       int err;
-
-       info = kmalloc(sizeof(struct omap_onenand_info), GFP_KERNEL);
-       if (!info)
-               return -ENOMEM;
-
-       memset(info, 0, sizeof(struct omap_onenand_info));
-
-       if (!request_mem_region(res->start, size, dev->driver->name)) {
-               err = -EBUSY;
-               goto out_free_info;
-       }
-
-       info->onenand.base = ioremap(res->start, size);
-       if (!info->onenand.base) {
-               err = -ENOMEM;
-               goto out_release_mem_region;
-       }
-
-       info->onenand.mmcontrol = pdata->mmcontrol;
-
-       info->mtd.name = pdev->dev.bus_id;
-       info->mtd.priv = &info->onenand;
-       info->mtd.owner = THIS_MODULE;
-
-       if (onenand_scan(&info->mtd, 1)) {
-               err = -ENXIO;
-               goto out_iounmap;
-       }
-
-#ifdef CONFIG_MTD_PARTITIONS
-       err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
-       if (err > 0)
-               add_mtd_partitions(&info->mtd, info->parts, err);
-       else if (err < 0 && pdata->parts)
-               add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts);
-       else
-#endif
-               err = add_mtd_device(&info->mtd);
-
-       dev_set_drvdata(&pdev->dev, info);
-
-       return 0;
-
-out_iounmap:
-       iounmap(info->onenand.base);
-out_release_mem_region:
-       release_mem_region(res->start, size);
-out_free_info:
-       kfree(info);
-
-       return err;
-}
-
-static int __devexit omap_onenand_remove(struct device *dev)
-{
-       struct platform_device *pdev = to_platform_device(dev);
-       struct omap_onenand_info *info = dev_get_drvdata(&pdev->dev);
-       struct resource *res = pdev->resource;
-       unsigned long size = res->end - res->start + 1;
-
-       dev_set_drvdata(&pdev->dev, NULL);
-
-       if (info) {
-               if (info->parts)
-                       del_mtd_partitions(&info->mtd);
-               else
-                       del_mtd_device(&info->mtd);
-
-               onenand_release(&info->mtd);
-               release_mem_region(res->start, size);
-               iounmap(info->onenand.base);
-               kfree(info);
-       }
-
-       return 0;
-}
-
-static struct device_driver omap_onenand_driver = {
-       .name           = DRIVER_NAME,
-       .bus            = &platform_bus_type,
-       .probe          = omap_onenand_probe,
-       .remove         = __devexit_p(omap_onenand_remove),
-};
-
-MODULE_ALIAS(DRIVER_NAME);
-
-static int __init omap_onenand_init(void)
-{
-       return driver_register(&omap_onenand_driver);
-}
-
-static void __exit omap_onenand_exit(void)
-{
-       driver_unregister(&omap_onenand_driver);
-}
-
-module_init(omap_onenand_init);
-module_exit(omap_onenand_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Kyungmin Park <kyungmin.park@samsung.com>");
-MODULE_DESCRIPTION("Glue layer for OneNAND flash on OMAP boards");