aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMister Oyster <oysterized@gmail.com>2017-12-24 17:14:32 +0100
committerMister Oyster <oysterized@gmail.com>2017-12-24 17:14:32 +0100
commit55b67ccfacfd10c9ef0e17b68af29b3688b6f03f (patch)
treec124cdbf9befc104f4705f1d6dc0a43a341c3319
parent4e131b7945d3594f2c5fb741f3e09b98cfaac09b (diff)
pmem: cleanup last bits of it
-rw-r--r--Documentation/android.txt1
-rw-r--r--drivers/misc/mediatek/mach/mt6735/mt_devs.c31
-rw-r--r--include/linux/android_pmem.h111
3 files changed, 1 insertions, 142 deletions
diff --git a/Documentation/android.txt b/Documentation/android.txt
index 0f40a78b0..455a95140 100644
--- a/Documentation/android.txt
+++ b/Documentation/android.txt
@@ -91,7 +91,6 @@ DNOTIFY
1.3 Recommended enabled config options
------------------------------
-ANDROID_PMEM
PSTORE_CONSOLE
PSTORE_RAM
SCHEDSTATS
diff --git a/drivers/misc/mediatek/mach/mt6735/mt_devs.c b/drivers/misc/mediatek/mach/mt6735/mt_devs.c
index c6b1cdc72..c1635c7d3 100644
--- a/drivers/misc/mediatek/mach/mt6735/mt_devs.c
+++ b/drivers/misc/mediatek/mach/mt6735/mt_devs.c
@@ -5,7 +5,6 @@
#include <linux/fs.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
-#include <linux/android_pmem.h>
#include <linux/memblock.h>
#include <asm/setup.h>
#include <asm/mach/arch.h>
@@ -1108,23 +1107,8 @@ struct platform_device mt3326_device_gps = {
#endif
/*=======================================================================*/
-/* MT6573 PMEM */
+/* MT6573 VMEM */
/*=======================================================================*/
-#if defined(CONFIG_ANDROID_PMEM)
-static struct android_pmem_platform_data pdata_multimedia = {
- .name = "pmem_multimedia",
- .no_allocator = 0,
- .cached = 1,
- .buffered = 1
-};
-
-static struct platform_device pmem_multimedia_device = {
- .name = "android_pmem",
- .id = 1,
- .dev = { .platform_data = &pdata_multimedia }
-};
-#endif
-
#if defined(CONFIG_ANDROID_VMEM)
static struct android_vmem_platform_data pdata_vmultimedia = {
.name = "vmem_multimedia",
@@ -2530,19 +2514,6 @@ retval = platform_device_register(&dummychar_device);
}
#endif
-
-#if defined(CONFIG_ANDROID_PMEM)
- pdata_multimedia.start = PMEM_MM_START;;
- pdata_multimedia.size = PMEM_MM_SIZE;
- printk("PMEM start: 0x%lx size: 0x%lx\n", pdata_multimedia.start, pdata_multimedia.size);
-
- retval = platform_device_register(&pmem_multimedia_device);
- printk("[%s]: pmem_multimedia_device, retval=%d \n!", __func__, retval);
- if (retval != 0){
- return retval;
- }
-#endif
-
#if defined(CONFIG_ANDROID_VMEM)
pdata_vmultimedia.start = PMEM_MM_START;;
pdata_vmultimedia.size = PMEM_MM_SIZE;
diff --git a/include/linux/android_pmem.h b/include/linux/android_pmem.h
deleted file mode 100644
index 8d7e40cae..000000000
--- a/include/linux/android_pmem.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* include/linux/android_pmem.h
- *
- * Copyright (C) 2007 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _ANDROID_PMEM_H_
-#define _ANDROID_PMEM_H_
-
-#define PMEM_IOCTL_MAGIC 'p'
-#define PMEM_GET_PHYS _IOW(PMEM_IOCTL_MAGIC, 1, unsigned int)
-#define PMEM_MAP _IOW(PMEM_IOCTL_MAGIC, 2, unsigned int)
-#define PMEM_GET_SIZE _IOW(PMEM_IOCTL_MAGIC, 3, unsigned int)
-#define PMEM_UNMAP _IOW(PMEM_IOCTL_MAGIC, 4, unsigned int)
-/* This ioctl will allocate pmem space, backing the file, it will fail
- * if the file already has an allocation, pass it the len as the argument
- * to the ioctl */
-#define PMEM_ALLOCATE _IOW(PMEM_IOCTL_MAGIC, 5, unsigned int)
-/* This will connect a one pmem file to another, pass the file that is already
- * backed in memory as the argument to the ioctl
- */
-#define PMEM_CONNECT _IOW(PMEM_IOCTL_MAGIC, 6, unsigned int)
-/* Returns the total size of the pmem region it is sent to as a pmem_region
- * struct (with offset set to 0).
- */
-#define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, unsigned int)
-#define PMEM_CACHE_FLUSH _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
-
-struct android_pmem_platform_data {
- const char *name;
- /* starting physical address of memory region */
- unsigned long start;
- /* size of memory region */
- unsigned long size;
- /* set to indicate the region should not be managed with an allocator */
- unsigned no_allocator;
- /* set to indicate maps of this region should be cached, if a mix of
- * cached and uncached is desired, set this and open the device with
- * O_SYNC to get an uncached region */
- unsigned cached;
- /* The MSM7k has bits to enable a write buffer in the bus controller */
- unsigned buffered;
-};
-
-struct pmem_region {
- unsigned long offset;
- unsigned long len;
-};
-
-#ifdef CONFIG_ANDROID_PMEM
-int is_pmem_file(struct file *file);
-int get_pmem_file(int fd, unsigned long *start, unsigned long *vstart,
- unsigned long *end, struct file **filp);
-int get_pmem_user_addr(struct file *file, unsigned long *start, unsigned long *end);
-void put_pmem_file(struct file *file);
-void flush_pmem_file(struct file *file, unsigned long start, unsigned long len);
-int pmem_setup(struct android_pmem_platform_data *pdata,
- long (*ioctl) (struct file *, unsigned int, unsigned long),
- int (*release) (struct inode *, struct file *));
-int pmem_remap(struct pmem_region *region, struct file *file, unsigned operation);
-
-#else
-static inline int is_pmem_file(struct file *file)
-{
- return 0;
-}
-
-static inline int get_pmem_file(int fd, unsigned long *start,
- unsigned long *vstart, unsigned long *end, struct file **filp)
-{
- return -ENOSYS;
-}
-
-static inline int get_pmem_user_addr(struct file *file, unsigned long *start, unsigned long *end)
-{
- return -ENOSYS;
-}
-
-static inline void put_pmem_file(struct file *file)
-{
- return;
-}
-
-static inline void flush_pmem_file(struct file *file, unsigned long start, unsigned long len)
-{
- return;
-}
-
-static inline int pmem_setup(struct android_pmem_platform_data *pdata,
- long (*ioctl) (struct file *, unsigned int, unsigned long),
- int (*release) (struct inode *, struct file *))
-{
- return -ENOSYS;
-}
-
-static inline int pmem_remap(struct pmem_region *region, struct file *file, unsigned operation)
-{
- return -ENOSYS;
-}
-#endif
-
-#endif /* _ANDROID_PPP_H_ */