* [PATCH] OMAP: c55x dummy code as dspfs plugin
@ 2006-09-12 9:35 Komal Shah
0 siblings, 0 replies; only message in thread
From: Komal Shah @ 2006-09-12 9:35 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 249 bytes --]
After applying the patch, please update arch/arm/mach-omap2/Makefile
to make it compile.
Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>
---Komal Shah
http://komalshah.blogspot.com
--
http://www.fastmail.fm - Send your email first class
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dsp.patch --]
[-- Type: text/x-patch; name="dsp.patch", Size: 2175 bytes --]
diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c
new file mode 100644
index 0000000..ffba320
--- /dev/null
+++ b/arch/arm/mach-omap2/dsp.c
@@ -0,0 +1,87 @@
+/*
+ * arch/arm/mach-omap2/dsp.c
+ *
+ * Support DSP (C55x) for OMAP2420 using dspfs.
+ *
+ * Author: Komal Shah (komal_shah802003@yahoo.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/dspfs.h>
+#include <linux/mm.h>
+#include <linux/kernel.h>
+#include <linux/fs.h>
+
+struct dentry *dentry;
+
+static int omap_dsp_init(void* arg)
+{
+ printk(KERN_NOTICE "DSP: Initializing\n");
+
+ return 0;
+}
+
+static void omap_dsp_exit(void* arg)
+{
+ printk(KERN_NOTICE "DSP: Exiting\n");
+}
+
+static ssize_t omap_dsp_dir_write(struct file *file, const char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ return generic_file_write(file, buf, count, ppos);
+}
+
+static struct file_operations omap_dsp_codecs_dir_fops = {
+ .open = dcache_dir_open,
+ .release = dcache_dir_close,
+ .llseek = dcache_dir_lseek,
+ .read = generic_read_dir,
+ .write = omap_dsp_dir_write,
+ .readdir = dcache_readdir,
+};
+
+static struct file_operations omap_dsp_percodec_fops = {
+ .read = generic_file_read,
+ .write = generic_file_write,
+};
+
+static struct tree_descr omap_dsp_percodec_files[] = {
+ {"frmdata_0", &omap_dsp_percodec_fops, S_IWUSR | S_IRUGO},
+ {"frmdata_1", &omap_dsp_percodec_fops, S_IWUSR | S_IRUGO},
+ {"" },
+};
+
+static struct dsp_info omap_dsp = {
+ .name = "c55x",
+ .parent = NULL,
+ .init = omap_dsp_init,
+ .exit = omap_dsp_exit,
+ .fops = &omap_dsp_codecs_dir_fops,
+ .percodec_files = omap_dsp_percodec_files,
+};
+
+static int __init omap_dsp_fs_init(void)
+{
+ dentry = dsp_register(&omap_dsp);
+
+ if (IS_ERR(dentry))
+ return PTR_ERR(dentry);
+
+ return 0;
+}
+
+static void __exit omap_dsp_fs_exit(void)
+{
+ dsp_unregister(dentry);
+}
+
+module_init(omap_dsp_fs_init);
+module_exit(omap_dsp_fs_exit);
+
+MODULE_LICENSE("GPL");
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-09-12 9:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-12 9:35 [PATCH] OMAP: c55x dummy code as dspfs plugin Komal Shah
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.