staging: ion: rockchip: remove unused feature

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>
This commit is contained in:
Jianqun Xu
2015-11-26 09:41:32 +08:00
committed by Gerrit Code Review
parent 4c29ea889f
commit de3570a39b
2 changed files with 0 additions and 31 deletions

26
drivers/staging/android/ion/rockchip/rockchip_ion.c Executable file → Normal file
View File

@@ -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;
}

View 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