staging: ion: rockchip: remove unused feature
authorJianqun Xu <jay.xu@rock-chips.com>
Thu, 26 Nov 2015 01:41:32 +0000 (09:41 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Mon, 30 Nov 2015 05:52:57 +0000 (13:52 +0800)
Remove codes related to:
- DRM
- secure
- psci

They are only required by part of platforms.

Change-Id: Ie03d2637971cdd9fad87b3a5b473566ebc94ac80
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
drivers/staging/android/ion/rockchip/rockchip_ion.c [changed mode: 0755->0644]
include/linux/rockchip_ion.h

old mode 100755 (executable)
new mode 100644 (file)
index 73caf00..7df4d05
@@ -32,7 +32,6 @@
 #endif
 
 #include <linux/compat.h>
-#include <linux/rockchip/psci.h>
 
 struct ion_device *rockchip_ion_dev;
 EXPORT_SYMBOL(rockchip_ion_dev);
@@ -51,9 +50,7 @@ extern struct ion_handle *ion_handle_get_by_id(struct ion_client *client,
 extern int ion_handle_put(struct ion_handle *handle);
 
 #define ION_CMA_HEAP_NAME              "cma"
-#define ION_IOMMU_HEAP_NAME            "iommu"
 #define ION_VMALLOC_HEAP_NAME          "vmalloc"
-#define ION_DRM_HEAP_NAME              "drm"
 #define ION_CARVEOUT_HEAP_NAME         "carveout"
 
 #define MAX_ION_HEAP           10
@@ -75,11 +72,6 @@ static struct ion_heap_desc ion_heap_meta[] = {
                .type   = ION_HEAP_TYPE_DMA,
                .name   = ION_CMA_HEAP_NAME,
        },
-       {
-               .id     = ION_DRM_HEAP_ID,
-               .type   = ION_HEAP_TYPE_DRM,
-               .name   = ION_DRM_HEAP_NAME,
-       },
        {
                .id     = ION_CARVEOUT_HEAP_ID,
                .type   = ION_HEAP_TYPE_CARVEOUT,
@@ -118,22 +110,6 @@ struct ion_client *rockchip_ion_client_create(const char *name)
 }
 EXPORT_SYMBOL(rockchip_ion_client_create);
 
-static int rockchip_ion_set_secured(struct ion_client *client,
-                                   unsigned long arg)
-{
-       bool val = 0;
-       int ret = 0;
-
-       if (copy_from_user(&val, (void __user *)arg, sizeof(bool)))
-               return -EFAULT;
-
-       ret = psci_set_memory_secure(val);
-       if (ret)
-               pr_err("%s fail to set memory secured (%d)\n", __func__, ret);
-
-       return ret;
-}
-
 #ifdef CONFIG_COMPAT
 struct compat_ion_phys_data {
        compat_int_t handle;
@@ -244,8 +220,6 @@ static long rockchip_custom_ioctl (struct ion_client *client, unsigned int cmd,
                switch (cmd) {
                case ION_IOC_GET_PHYS:
                        return rockchip_ion_get_phys(client, arg);
-               case ION_IOC_SET_SECURED:
-                       return rockchip_ion_set_secured(client, arg);
                default:
                        return -ENOTTY;
                }
index f62e728557d195d00ee12a9785223b186d882302..2961bae292ffb134ec172f70dbad71d9407585bd 100644 (file)
@@ -31,7 +31,6 @@ enum ion_heap_ids {
        ION_VMALLOC_HEAP_ID = 0,
        ION_CARVEOUT_HEAP_ID = 2,
        ION_CMA_HEAP_ID = 4,
-       ION_DRM_HEAP_ID = 5,
 };
 
 #define ION_HEAP(bit) (1 << (bit))
@@ -49,8 +48,4 @@ struct ion_phys_data {
  */
 #define ION_IOC_GET_PHYS       _IOWR(ION_IOC_ROCKCHIP_MAGIC, 0, \
                                                struct ion_phys_data)
-/**
- * Set memory region secured.
- */
-#define ION_IOC_SET_SECURED    _IOWR(ION_IOC_ROCKCHIP_MAGIC, 1, bool)
 #endif