OSDN Git Service

mtd: rawnand: fsmc: Keep bank enable bit set
[uclinux-h8/linux.git] / drivers / iommu / tegra-gart.c
index 7b1361d..da6a4e3 100644 (file)
@@ -3,6 +3,8 @@
  *
  * Copyright (c) 2010-2012, NVIDIA CORPORATION.  All rights reserved.
  *
+ * Author: Hiroshi DOYU <hdoyu@nvidia.com>
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
  * version 2, as published by the Free Software Foundation.
@@ -19,7 +21,8 @@
 
 #define pr_fmt(fmt)    "%s(): " fmt, __func__
 
-#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/moduleparam.h>
 #include <linux/platform_device.h>
 #include <linux/spinlock.h>
 #include <linux/slab.h>
@@ -478,20 +481,6 @@ static int tegra_gart_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int tegra_gart_remove(struct platform_device *pdev)
-{
-       struct gart_device *gart = platform_get_drvdata(pdev);
-
-       iommu_device_unregister(&gart->iommu);
-       iommu_device_sysfs_remove(&gart->iommu);
-
-       writel(0, gart->regs + GART_CONFIG);
-       if (gart->savedata)
-               vfree(gart->savedata);
-       gart_handle = NULL;
-       return 0;
-}
-
 static const struct dev_pm_ops tegra_gart_pm_ops = {
        .suspend        = tegra_gart_suspend,
        .resume         = tegra_gart_resume,
@@ -501,34 +490,22 @@ static const struct of_device_id tegra_gart_of_match[] = {
        { .compatible = "nvidia,tegra20-gart", },
        { },
 };
-MODULE_DEVICE_TABLE(of, tegra_gart_of_match);
 
 static struct platform_driver tegra_gart_driver = {
        .probe          = tegra_gart_probe,
-       .remove         = tegra_gart_remove,
        .driver = {
                .name   = "tegra-gart",
                .pm     = &tegra_gart_pm_ops,
                .of_match_table = tegra_gart_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
-static int tegra_gart_init(void)
+static int __init tegra_gart_init(void)
 {
        return platform_driver_register(&tegra_gart_driver);
 }
-
-static void __exit tegra_gart_exit(void)
-{
-       platform_driver_unregister(&tegra_gart_driver);
-}
-
 subsys_initcall(tegra_gart_init);
-module_exit(tegra_gart_exit);
-module_param(gart_debug, bool, 0644);
 
+module_param(gart_debug, bool, 0644);
 MODULE_PARM_DESC(gart_debug, "Enable GART debugging");
-MODULE_DESCRIPTION("IOMMU API for GART in Tegra20");
-MODULE_AUTHOR("Hiroshi DOYU <hdoyu@nvidia.com>");
-MODULE_ALIAS("platform:tegra-gart");
-MODULE_LICENSE("GPL v2");