diff options
author | David Sin <davidsin@ti.com> | 2010-01-13 18:49:21 -0600 |
---|---|---|
committer | David Sin <davidsin@ti.com> | 2010-06-02 09:52:55 -0500 |
commit | 9fd0be108232051c1b3e3d773b9945988061637a (patch) | |
tree | f8e29273e2003d9091501bcd785f4bf6cbe1a2de /drivers/media/video/dmm/dmm.c | |
parent | 7439bcac8a3f41c7d7b519dc7c6952aa24611856 (diff) |
enable tiler_alloc, mmap, and tiler_free to pass initial tests
Diffstat (limited to 'drivers/media/video/dmm/dmm.c')
-rw-r--r-- | drivers/media/video/dmm/dmm.c | 70 |
1 files changed, 26 insertions, 44 deletions
diff --git a/drivers/media/video/dmm/dmm.c b/drivers/media/video/dmm/dmm.c index b435636febe8..88dd95ba6cbc 100644 --- a/drivers/media/video/dmm/dmm.c +++ b/drivers/media/video/dmm/dmm.c @@ -26,15 +26,11 @@ #include <linux/errno.h> #include "dmm.h" +#include "../tiler/tiler.h" #define DEBUG(x) printk(KERN_NOTICE "%s()::%d:%s=(0x%08x)\n", \ __func__, __LINE__, #x, (s32)x); -static s32 dmm_open(struct inode *i, struct file *f); -static s32 dmm_release(struct inode *i, struct file *f); -static s32 dmm_ioctl(struct inode *i, struct file *f, u32 c, unsigned long a); -static s32 dmm_mmap(struct file *f, struct vm_area_struct *v); - static s32 dmm_major; static s32 dmm_minor; @@ -46,12 +42,6 @@ struct dmm_dev { static struct dmm_dev *dmm_device; static struct class *dmmdev_class; -static const struct file_operations dmm_fops = { - .open = dmm_open, - .ioctl = dmm_ioctl, - .release = dmm_release, - .mmap = dmm_mmap, -}; static struct platform_driver dmm_driver_ldm = { .driver = { @@ -63,14 +53,31 @@ static struct platform_driver dmm_driver_ldm = { .remove = NULL, }; +static s32 dmm_open(struct inode *ip, struct file *filp) +{ + s32 r = -1; + r = 0; + return r; +} + +static s32 dmm_release(struct inode *ip, struct file *filp) +{ + s32 r = -1; + r = 0; + return r; +} + +static const struct file_operations dmm_fops = { + .open = dmm_open, + .release = dmm_release, +}; + static s32 __init dmm_init(void) { dev_t dev = 0; s32 r = -1; struct device *device = NULL; - DEBUG(0); - if (dmm_major) { dev = MKDEV(dmm_major, dmm_minor); r = register_chrdev_region(dev, 1, "dmm"); @@ -112,28 +119,17 @@ static s32 __init dmm_init(void) if (!dmm_base) return -ENOMEM; - __raw_writel(0x88888888, DMM_BASE + DMM_PAT_VIEW__0); - __raw_writel(0x88888888, DMM_BASE + DMM_PAT_VIEW__1); - __raw_writel(0x80808080, DMM_BASE + DMM_PAT_VIEW_MAP__0); - __raw_writel(0x80000000, DMM_BASE + DMM_PAT_VIEW_MAP_BASE); - __raw_writel(0x88888888, DMM_BASE + DMM_TILER_OR__0); - __raw_writel(0x88888888, DMM_BASE + DMM_TILER_OR__1); + __raw_writel(0x88888888, dmm_base + DMM_PAT_VIEW__0); + __raw_writel(0x88888888, dmm_base + DMM_PAT_VIEW__1); + __raw_writel(0x80808080, dmm_base + DMM_PAT_VIEW_MAP__0); + __raw_writel(0x80000000, dmm_base + DMM_PAT_VIEW_MAP_BASE); + __raw_writel(0x88888888, dmm_base + DMM_TILER_OR__0); + __raw_writel(0x88888888, dmm_base + DMM_TILER_OR__1); EXIT: return r; } -static s32 dmm_ioctl(struct inode *ip, struct file *filp, u32 cmd, - unsigned long arg) -{ - return 0; -} - -static s32 dmm_mmap(struct file *filp, struct vm_area_struct *vma) -{ - return 0; -} - static void __exit dmm_exit(void) { platform_driver_unregister(&dmm_driver_ldm); @@ -143,20 +139,6 @@ static void __exit dmm_exit(void) class_destroy(dmmdev_class); } -static s32 dmm_open(struct inode *ip, struct file *filp) -{ - s32 r = -1; - r = 0; - return r; -} - -static s32 dmm_release(struct inode *ip, struct file *filp) -{ - s32 r = -1; - r = 0; - return r; -} - MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("davidsin@ti.com"); module_init(dmm_init); |