diff options
Diffstat (limited to 'media-plugins/gst-openmax/files/0099-temp-32k-header-dec10.patch')
-rw-r--r-- | media-plugins/gst-openmax/files/0099-temp-32k-header-dec10.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/media-plugins/gst-openmax/files/0099-temp-32k-header-dec10.patch b/media-plugins/gst-openmax/files/0099-temp-32k-header-dec10.patch new file mode 100644 index 0000000..e85ad31 --- /dev/null +++ b/media-plugins/gst-openmax/files/0099-temp-32k-header-dec10.patch @@ -0,0 +1,81 @@ +From 45d23a18eb366220992e367422b958699be55623 Mon Sep 17 00:00:00 2001 +From: Olivier Naudan <o-naudan@ti.com> +Date: Thu, 16 Dec 2010 13:10:03 +0100 +Subject: [PATCH] Temporary patch to access OMAP 32K timer (not yet exported by the kernel) + +--- + omx/gstomx_camera.c | 2 +- + omx/timer-32k.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 49 insertions(+), 1 deletions(-) + create mode 100644 omx/timer-32k.h + +diff --git a/omx/gstomx_camera.c b/omx/gstomx_camera.c +index 9a33cfb..fc73422 100644 +--- a/omx/gstomx_camera.c ++++ b/omx/gstomx_camera.c +@@ -34,7 +34,7 @@ + #include <stdint.h> + #include <fcntl.h> + #include <sys/ioctl.h> +-#include <linux/timer-32k.h> ++#include "timer-32k.h" + #include <OMX_CoreExt.h> + #include <OMX_IndexExt.h> + +diff --git a/omx/timer-32k.h b/omx/timer-32k.h +new file mode 100644 +index 0000000..98fc2dc +--- /dev/null ++++ b/omx/timer-32k.h +@@ -0,0 +1,48 @@ ++/* ++ * OMAP2/3/4 timer32k driver interface ++ * ++ * Copyright (C) 2010 Texas Instruments, Inc ++ * ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ */ ++ ++#ifndef __LINUX_TIMER_32_H__ ++#define __LINUX_TIMER_32_H__ ++ ++#include <linux/ioctl.h> ++#define OMAP_32K_READ _IOWR('t', 0, uint32_t) ++#define OMAP_32K_READRAW _IOWR('t', 1, uint32_t) ++ ++#ifndef __KERNEL__ ++ ++#include <stdint.h> ++#include <fcntl.h> ++#include <sys/ioctl.h> ++ ++static inline uint32_t __omap_32k_call(int nr) ++{ ++ static int fd; ++ if (!fd) ++ fd = open("/dev/timer32k", 0); ++ ++ if (fd) { ++ uint32_t t; ++ if (ioctl(fd, nr, &t) >= 0) ++ return t; ++ } ++ return 0; ++} ++static inline uint32_t omap_32k_read(void) ++{ ++ return __omap_32k_call(OMAP_32K_READ); ++} ++static inline uint32_t omap_32k_readraw(void) ++{ ++ return __omap_32k_call(OMAP_32K_READRAW); ++} ++#endif ++ ++#endif /* __LINUX_TIMER_32_H__ */ ++ +-- +1.7.1 + |