[Armadeus-commitlog] SF.net SVN: armadeus:[1181] trunk/buildroot/target/device/armadeus/linux/ kern
Brought to you by:
sszy
|
From: <ar...@us...> - 2009-03-22 09:39:01
|
Revision: 1181
http://armadeus.svn.sourceforge.net/armadeus/?rev=1181&view=rev
Author: artemys
Date: 2009-03-22 09:38:51 +0000 (Sun, 22 Mar 2009)
Log Message:
-----------
[LINUX] Add driver for i.MX27 VPU (Video Processing Unit)
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/318-apf27-pengu-mxc_add_vpu_driver.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/319-apf27-pengu-mx2_add_vpu_device.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-03-21 17:06:05 UTC (rev 1180)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-03-22 09:38:51 UTC (rev 1181)
@@ -4,8 +4,8 @@
Index: linux-2.6.27.13/arch/arm/mach-mx2/apf27.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.27.13/arch/arm/mach-mx2/apf27.c 2009-03-13 11:02:49.000000000 +0100
-@@ -0,0 +1,1303 @@
++++ linux-2.6.27.13/arch/arm/mach-mx2/apf27.c 2009-03-20 09:21:52.000000000 +0100
+@@ -0,0 +1,1306 @@
+ /*
+ * apf27.c
+ *
@@ -216,7 +216,7 @@
+#define TSC2101_CS (GPIO_PORTD|21)
+#define MCP251X_CS (GPIO_PORTD|20)
+static int mxc_cspi1_pins[] = {
-+ (TSC2101_CS | GPIO_OUT | GPIO_GPIO ), /* <- Seulement si TSC sélectionné aussi !! */
++ (TSC2101_CS | GPIO_OUT | GPIO_GPIO ), /* <- Only if TSC is selected too !! */
+ (MCP251X_CS | GPIO_OUT | GPIO_GPIO ),
+ //PD19_PF_CSPI2_SS2,
+ //PD20_PF_CSPI2_SS1, /* MCP2515 */
@@ -1034,6 +1034,9 @@
+#endif
+ ALSA_SOUND
+ CPU_FREQUENCY
++#ifdef CONFIG_MXC_VPU
++ &mxc_vpu_device,
++#endif
+};
+
+
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/318-apf27-pengu-mxc_add_vpu_driver.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/318-apf27-pengu-mxc_add_vpu_driver.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/318-apf27-pengu-mxc_add_vpu_driver.patch 2009-03-22 09:38:51 UTC (rev 1181)
@@ -0,0 +1,652 @@
+From: Sascha Hauer <s....@pe...>
+Date: Tue, 11 Nov 2008 12:36:49 +0000 (+0100)
+Subject: MXC: Add vpu driver
+X-Git-Url: http://pasiphae.extern.pengutronix.de/?p=imx%2Flinux-2.6.git;a=commitdiff_plain;h=6fecdadc964f2ac25e445435a2e9c62a0a46e235
+
+MXC: Add vpu driver
+
+This adds support for the VPU (Video Processing unit) found on mx27.
+The patch has been taken nearly 1:1 from the freescale repository, so
+it can use some cleanup. At a first glance this looks for a good usecase
+for UIO.
+
+20081023 convert to use device_create
+
+20081104 let userspace access the codec engine through PAR
+
+ Set Peripheral access register bit for the codec to 0.
+ Freescale invents funny names for this bit in the PAR. It's called
+ 'reserved'. Grumpf.
+
+Signed-off-by: Sascha Hauer <s....@pe...>
+---
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 9722f8b..209a53d 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -1268,6 +1268,8 @@ source "drivers/rtc/Kconfig"
+
+ source "drivers/dma/Kconfig"
+
++source "drivers/mxc/Kconfig"
++
+ source "drivers/dca/Kconfig"
+
+ source "drivers/auxdisplay/Kconfig"
+diff --git a/drivers/Makefile b/drivers/Makefile
+index fceb71a..99c847c 100644
+--- a/drivers/Makefile
++++ b/drivers/Makefile
+@@ -102,3 +102,4 @@ obj-$(CONFIG_SSB) += ssb/
+ obj-$(CONFIG_VIRTIO) += virtio/
+ obj-$(CONFIG_REGULATOR) += regulator/
+ obj-$(CONFIG_STAGING) += staging/
++obj-y += mxc/
+\ No newline at end of file
+diff --git a/drivers/mxc/Kconfig b/drivers/mxc/Kconfig
+new file mode 100644
+index 0000000..90fcfd1
+--- /dev/null
++++ b/drivers/mxc/Kconfig
+@@ -0,0 +1,13 @@
++# drivers/video/mxc/Kconfig
++
++if ARCH_MXC
++
++menu "MXC support drivers"
++
++#if MACH_MX27
++source "drivers/mxc/vpu/Kconfig"
++#endif
++
++endmenu
++
++endif
+diff --git a/drivers/mxc/Makefile b/drivers/mxc/Makefile
+new file mode 100644
+index 0000000..619ae8f
+--- /dev/null
++++ b/drivers/mxc/Makefile
+@@ -0,0 +1,3 @@
++#
++obj-$(CONFIG_MXC_VPU) += vpu/
++
+diff --git a/drivers/mxc/vpu/Kconfig b/drivers/mxc/vpu/Kconfig
+new file mode 100644
+index 0000000..4dae100
+--- /dev/null
++++ b/drivers/mxc/vpu/Kconfig
+@@ -0,0 +1,21 @@
++#
++# Codec configuration
++#
++
++menu "MXC VPU(Video Processing Unit) support"
++
++config MXC_VPU
++ tristate "Support for MXC VPU(Video Processing Unit)"
++ depends on MACH_MX27
++ ---help---
++ The VPU codec device provides codec function for H.264/MPEG4/H.263
++
++config MXC_VPU_DEBUG
++ bool "MXC VPU debugging"
++ depends on MXC_VPU
++ help
++ This is an option for the developers; most people should
++ say N here. This enables MXC VPU driver debugging.
++
++endmenu
++
+diff --git a/drivers/mxc/vpu/Makefile b/drivers/mxc/vpu/Makefile
+new file mode 100644
+index 0000000..ad96730
+--- /dev/null
++++ b/drivers/mxc/vpu/Makefile
+@@ -0,0 +1,10 @@
++#
++# Makefile for the VPU drivers.
++#
++
++obj-$(CONFIG_MXC_VPU) += vpu.o
++vpu-objs := mxc_vpu.o
++
++ifeq ($(CONFIG_MXC_VPU_DEBUG),y)
++EXTRA_CFLAGS += -DDEBUG
++endif
+diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c
+new file mode 100644
+index 0000000..e77601c
+--- /dev/null
++++ b/drivers/mxc/vpu/mxc_vpu.c
+@@ -0,0 +1,501 @@
++/*
++ * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mxc_vpu.c
++ *
++ * @brief VPU system initialization and file operation implementation
++ *
++ * @ingroup VPU
++ */
++
++#include <linux/kernel.h>
++#include <linux/fs.h>
++#include <linux/mm.h>
++#include <linux/interrupt.h>
++#include <linux/autoconf.h>
++#include <linux/ioport.h>
++#include <linux/stat.h>
++#include <linux/platform_device.h>
++#include <linux/kdev_t.h>
++#include <linux/dma-mapping.h>
++#include <linux/wait.h>
++#include <linux/list.h>
++#include <linux/clk.h>
++#include <linux/io.h>
++
++#include <asm/uaccess.h>
++#include <asm/sizes.h>
++#include <asm/dma-mapping.h>
++
++#include <mach/hardware.h>
++
++#include "mxc_vpu.h"
++
++#define BIT_INT_CLEAR 0x00C
++#define BIT_INT_STATUS 0x010
++#define BIT_INT_ENABLE 0x170
++
++typedef struct vpu_t {
++ struct fasync_struct *async_queue;
++} vpu_t;
++
++/* To track the allocated memory buffer */
++typedef struct memalloc_record {
++ struct list_head list;
++ vpu_mem_desc mem;
++} memalloc_record;
++
++static DEFINE_SPINLOCK(vpu_lock);
++static LIST_HEAD(head);
++
++static int vpu_major = 0;
++static struct class *vpu_class;
++static struct vpu_t vpu_data;
++static u8 open_count = 0;
++static struct clk *vpu_clk;
++
++/* implement the blocking ioctl */
++static int codec_done = 0;
++static wait_queue_head_t vpu_queue;
++static int wait_intr_cnt = 0;
++
++/*!
++ * Private function to free buffers
++ * @return status 0 success.
++ */
++static int vpu_free_buffers(void)
++{
++ struct memalloc_record *rec, *n;
++ vpu_mem_desc mem;
++
++ spin_lock(&vpu_lock);
++ list_for_each_entry_safe(rec, n, &head, list) {
++ mem = rec->mem;
++ if (mem.cpu_addr != 0) {
++ dma_free_coherent(0, PAGE_ALIGN(mem.size),
++ (void *)mem.cpu_addr, mem.phy_addr);
++ pr_debug("[FREE] freed paddr=0x%08X\n", mem.phy_addr);
++
++ /* delete from list */
++ list_del(&rec->list);
++ kfree(rec);
++ }
++ }
++ spin_unlock(&vpu_lock);
++
++ return 0;
++}
++
++/*!
++ * @brief vpu interrupt handler
++ */
++static irqreturn_t vpu_irq_handler(int irq, void *dev_id)
++{
++ struct vpu_t *dev;
++ dev = (struct vpu_t *)dev_id;
++ __raw_readl(IO_ADDRESS(VPU_BASE_ADDR + BIT_INT_STATUS));
++ __raw_writel(0x1, IO_ADDRESS(VPU_BASE_ADDR + BIT_INT_CLEAR));
++ if (dev->async_queue)
++ kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
++
++ codec_done = 1;
++ wake_up_interruptible(&vpu_queue);
++
++ return IRQ_HANDLED;
++}
++
++/*!
++ * @brief vpu hardware enable function
++ *
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_hardware_enable(void)
++{
++ u32 tmp;
++
++ clk_enable(vpu_clk);
++
++ /* Let userspace access the codec engine through the
++ * peripheral access register.
++ */
++ tmp = __raw_readl(IO_ADDRESS(AIPI_BASE_ADDR + 0x00020008));
++ __raw_writel(tmp & ~(1 << 3), IO_ADDRESS(AIPI_BASE_ADDR + 0x00020008));
++
++ return 0;
++}
++
++/*!
++ * @brief vpu hardware disable function
++ *
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_hardware_disable(void)
++{
++ clk_disable(vpu_clk);
++ return 0;
++
++}
++
++/*!
++ * @brief open function for vpu file operation
++ *
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_open(struct inode *inode, struct file *filp)
++{
++ if (open_count++ == 0) {
++ filp->private_data = (void *)(&vpu_data);
++ vpu_hardware_enable();
++ } else {
++ printk(KERN_ERR "VPU has already been opened.\n");
++ return -EACCES;
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief IO ctrl function for vpu file operation
++ * @param cmd IO ctrl command
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_ioctl(struct inode *inode, struct file *filp, u_int cmd,
++ u_long arg)
++{
++ int ret = 0;
++
++ switch (cmd) {
++ case VPU_IOC_PHYMEM_ALLOC:
++ {
++ struct memalloc_record *rec;
++
++ rec = kzalloc(sizeof(*rec), GFP_KERNEL);
++ if (!rec)
++ return -ENOMEM;
++
++ ret = copy_from_user(&(rec->mem), (vpu_mem_desc *) arg,
++ sizeof(vpu_mem_desc));
++ if (ret) {
++ kfree(rec);
++ return -EFAULT;
++ }
++
++ pr_debug("[ALLOC] mem alloc size = 0x%x\n",
++ rec->mem.size);
++ rec->mem.cpu_addr = (unsigned long)
++ dma_alloc_coherent(NULL,
++ PAGE_ALIGN(rec->mem.size),
++ (dma_addr_t
++ *) (&(rec->mem.phy_addr)),
++ GFP_DMA | GFP_KERNEL);
++ pr_debug("[ALLOC] mem alloc cpu_addr = 0x%x\n",
++ rec->mem.cpu_addr);
++ if ((void *)(rec->mem.cpu_addr) == NULL) {
++ kfree(rec);
++ printk(KERN_ERR
++ "Physical memory allocation error!\n");
++ ret = -1;
++ break;
++ }
++ ret = copy_to_user((void __user *)arg, &(rec->mem),
++ sizeof(vpu_mem_desc));
++ if (ret) {
++ kfree(rec);
++ ret = -EFAULT;
++ break;
++ }
++
++ spin_lock(&vpu_lock);
++ list_add(&rec->list, &head);
++ spin_unlock(&vpu_lock);
++
++ break;
++ }
++ case VPU_IOC_PHYMEM_FREE:
++ {
++ struct memalloc_record *rec, *n;
++ vpu_mem_desc vpu_mem;
++
++ ret = copy_from_user(&vpu_mem, (vpu_mem_desc *) arg,
++ sizeof(vpu_mem_desc));
++ if (ret)
++ return -EACCES;
++
++ pr_debug("[FREE] mem freed cpu_addr = 0x%x\n",
++ vpu_mem.cpu_addr);
++ if ((void *)vpu_mem.cpu_addr != NULL) {
++ dma_free_coherent(NULL,
++ PAGE_ALIGN(vpu_mem.size),
++ (void *)vpu_mem.cpu_addr,
++ (dma_addr_t) vpu_mem.
++ phy_addr);
++ }
++
++ spin_lock(&vpu_lock);
++ list_for_each_entry_safe(rec, n, &head, list) {
++ if (rec->mem.cpu_addr == vpu_mem.cpu_addr) {
++ /* delete from list */
++ list_del(&rec->list);
++ kfree(rec);
++ break;
++ }
++ }
++ spin_unlock(&vpu_lock);
++
++ break;
++ }
++ case VPU_IOC_WAIT4INT:
++ {
++ u_long timeout = (u_long) arg;
++ if (!wait_event_interruptible_timeout
++ (vpu_queue, codec_done != 0,
++ msecs_to_jiffies(timeout))) {
++ printk(KERN_WARNING "VPU blocking: timeout.\n");
++ ret = -ETIME;
++ return ret;
++ } else if (signal_pending(current)) {
++ if (wait_intr_cnt == 0) {
++ printk(KERN_WARNING "VPU interrupt received.\n");
++ }
++ wait_intr_cnt++;
++ ret = -ERESTARTSYS;
++ return ret;
++ }
++
++ codec_done = 0;
++ break;
++
++ }
++/* RMW: this is not portable across platforms */
++#ifdef CONFIG_ARCH_MX27
++ /* set/clear LHD (Latency Hiding Disable) bit in ESDCFG0 reg.
++ Tends to fix MPEG4 issue on MX27 TO2 */
++ case VPU_IOC_LHD:
++ {
++ u_int disable = (u_int) arg;
++ u_int reg;
++ u_int reg_addr;
++
++ reg_addr = IO_ADDRESS(SDRAMC_BASE_ADDR + 0x10);
++ reg = __raw_readl(reg_addr);
++ pr_debug("ESDCFG0: [ 0x%08x ]\n", reg);
++
++ if (disable == 0) {
++ __raw_writel(reg & ~0x00000020, reg_addr);
++ pr_debug("Latency Hiding Disable\n");
++ } else {
++ __raw_writel(reg | 0x00000020, reg_addr);
++ pr_debug("Latency Hiding Enable\n");
++ }
++
++ pr_debug("ESDCFG0: [ 0x%08x ]\n",
++ __raw_readl(reg_addr));
++
++ break;
++ }
++#endif
++ case VPU_IOC_VL2CC_FLUSH:
++ break;
++ case VPU_IOC_REG_DUMP:
++ break;
++ case VPU_IOC_PHYMEM_DUMP:
++ break;
++ default:
++ {
++ printk(KERN_ERR "No such IOCTL, cmd is %d\n", cmd);
++ break;
++ }
++ }
++ return ret;
++}
++
++/*!
++ * @brief Release function for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_release(struct inode *inode, struct file *filp)
++{
++ if (--open_count == 0) {
++ vpu_free_buffers();
++ vpu_hardware_disable();
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief fasync function for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_fasync(int fd, struct file *filp, int mode)
++{
++ struct vpu_t *dev = (struct vpu_t *)filp->private_data;
++ return fasync_helper(fd, filp, mode, &dev->async_queue);
++}
++
++/*!
++ * @brief memory map function of harware registers for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_map_hwregs(struct file *fp, struct vm_area_struct *vm)
++{
++ unsigned long pfn;
++
++ vm->vm_flags |= VM_IO | VM_RESERVED;
++ vm->vm_page_prot = pgprot_noncached(vm->vm_page_prot);
++ pfn = VPU_BASE_ADDR >> PAGE_SHIFT;
++ pr_debug("size=0x%x, page no.=0x%x\n",
++ (int)(vm->vm_end - vm->vm_start), (int)pfn);
++ return remap_pfn_range(vm, vm->vm_start, pfn, vm->vm_end - vm->vm_start,
++ vm->vm_page_prot) ? -EAGAIN : 0;
++}
++
++/*!
++ * @brief memory map function of memory for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_map_mem(struct file *fp, struct vm_area_struct *vm)
++{
++ int request_size;
++ request_size = vm->vm_end - vm->vm_start;
++
++ pr_debug(" start=0x%x, pgoff=0x%x, size=0x%x\n",
++ (unsigned int)(vm->vm_start), (unsigned int)(vm->vm_pgoff),
++ request_size);
++
++ vm->vm_flags |= VM_IO | VM_RESERVED;
++ vm->vm_page_prot = pgprot_noncached(vm->vm_page_prot);
++
++ return remap_pfn_range(vm, vm->vm_start, vm->vm_pgoff,
++ request_size, vm->vm_page_prot) ? -EAGAIN : 0;
++
++}
++
++/*!
++ * @brief memory map interface for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_mmap(struct file *fp, struct vm_area_struct *vm)
++{
++ if (vm->vm_pgoff)
++ return vpu_map_mem(fp, vm);
++ else
++ return vpu_map_hwregs(fp, vm);
++}
++
++struct file_operations vpu_fops = {
++ .owner = THIS_MODULE,
++ .open = vpu_open,
++ .ioctl = vpu_ioctl,
++ .release = vpu_release,
++ .fasync = vpu_fasync,
++ .mmap = vpu_mmap,
++};
++
++/*!
++ * This function is called by the driver framework to initialize the vpu device.
++ * @param dev The device structure for the vpu passed in by the framework.
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_dev_probe(struct platform_device *pdev)
++{
++ int err = 0;
++ struct device *temp_device;
++ struct resource *res;
++
++ vpu_major = register_chrdev(vpu_major, "mxc_vpu", &vpu_fops);
++ if (vpu_major < 0) {
++ printk(KERN_ERR "vpu: unable to get a major for VPU\n");
++ err = -EBUSY;
++ goto error;
++ }
++
++ vpu_class = class_create(THIS_MODULE, "mxc_vpu");
++ if (IS_ERR(vpu_class)) {
++ err = PTR_ERR(vpu_class);
++ goto err_out_chrdev;
++ }
++
++ temp_device = device_create(vpu_class, NULL,
++ MKDEV(vpu_major, 0), NULL, "mxc_vpu");
++ if (IS_ERR(temp_device)) {
++ err = PTR_ERR(temp_device);
++ goto err_out_class;
++ }
++
++ vpu_clk = clk_get(&pdev->dev, "vpu_clk");
++ if (IS_ERR(vpu_clk)) {
++ err = -ENOENT;
++ goto err_out_class;
++ }
++
++ err = request_irq(MXC_INT_VPU, vpu_irq_handler, 0, "VPU_CODEC_IRQ",
++ (void *)(&vpu_data));
++ if (err)
++ goto err_out_class;
++
++ printk(KERN_INFO "VPU initialized\n");
++ goto out;
++
++ err_out_class:
++ device_destroy(vpu_class, MKDEV(vpu_major, 0));
++ class_destroy(vpu_class);
++ err_out_chrdev:
++ unregister_chrdev(vpu_major, "mxc_vpu");
++ error:
++ out:
++ return err;
++}
++
++/*! Driver definition
++ *
++ */
++static struct platform_driver mxcvpu_driver = {
++ .driver = {
++ .name = "mxc_vpu",
++ },
++ .probe = vpu_dev_probe,
++};
++
++static int __init vpu_init(void)
++{
++ int ret = platform_driver_register(&mxcvpu_driver);
++
++ init_waitqueue_head(&vpu_queue);
++
++ return ret;
++}
++
++static void __exit vpu_exit(void)
++{
++ free_irq(MXC_INT_VPU, (void *)(&vpu_data));
++ if (vpu_major > 0) {
++ device_destroy(vpu_class, MKDEV(vpu_major, 0));
++ class_destroy(vpu_class);
++ unregister_chrdev(vpu_major, "mxc_vpu");
++ vpu_major = 0;
++ }
++
++ clk_put(vpu_clk);
++
++ platform_driver_unregister(&mxcvpu_driver);
++ return;
++}
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("Linux VPU driver for Freescale i.MX27");
++MODULE_LICENSE("GPL");
++
++module_init(vpu_init);
++module_exit(vpu_exit);
+diff --git a/drivers/mxc/vpu/mxc_vpu.h b/drivers/mxc/vpu/mxc_vpu.h
+new file mode 100644
+index 0000000..df3b99f
+--- /dev/null
++++ b/drivers/mxc/vpu/mxc_vpu.h
+@@ -0,0 +1,22 @@
++typedef struct vpu_mem_desc {
++ u32 size;
++ dma_addr_t phy_addr;
++ u32 cpu_addr; /* cpu address to free the dma mem */
++ u32 virt_uaddr; /* virtual user space address */
++} vpu_mem_desc;
++
++#define VPU_IOC_MAGIC 'V'
++
++#define VPU_IOC_PHYMEM_ALLOC _IO(VPU_IOC_MAGIC, 0)
++#define VPU_IOC_PHYMEM_FREE _IO(VPU_IOC_MAGIC, 1)
++#define VPU_IOC_WAIT4INT _IO(VPU_IOC_MAGIC, 2)
++#define VPU_IOC_PHYMEM_DUMP _IO(VPU_IOC_MAGIC, 3)
++#define VPU_IOC_REG_DUMP _IO(VPU_IOC_MAGIC, 4)
++#define VPU_IOC_LHD _IO(VPU_IOC_MAGIC, 5)
++#define VPU_IOC_VL2CC_FLUSH _IO(VPU_IOC_MAGIC, 6)
++
++int vl2cc_init(u32 vl2cc_hw_base);
++void vl2cc_enable(void);
++void vl2cc_flush(void);
++void vl2cc_disable(void);
++void vl2cc_cleanup(void);
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/319-apf27-pengu-mx2_add_vpu_device.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/319-apf27-pengu-mx2_add_vpu_device.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/319-apf27-pengu-mx2_add_vpu_device.patch 2009-03-22 09:38:51 UTC (rev 1181)
@@ -0,0 +1,19 @@
+From: Sascha Hauer <s....@pe...>
+Date: Tue, 11 Nov 2008 14:46:05 +0000 (+0100)
+Subject: MX2: Add VPU (video processing unit) device
+X-Git-Url: http://pasiphae.extern.pengutronix.de/?p=imx%2Flinux-2.6.git;a=commitdiff_plain;h=362e97c9b0a6fa4b861462958ccdfcbdf8d3a118
+
+MX2: Add VPU (video processing unit) device
+
+Signed-off-by: Sascha Hauer <s....@pe...>
+---
+
+diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h
+index 64bb85b..c3c3a81 100644
+--- a/arch/arm/mach-mx2/devices.h
++++ b/arch/arm/mach-mx2/devices.h
+@@ -28,3 +28,4 @@ extern struct platform_device imx_i2c_device0;
+ extern struct platform_device imx_i2c_device1;
+ extern struct platform_device mx27_camera_device;
+ extern struct platform_device mxc_fb_device;
++extern struct platform_device mxc_vpu_device;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|