Merge current mainline tree into linux-omap tree
[pandora-kernel.git] / arch / arm / plat-omap / include / mach / dsp_common.h
1 /*
2  * This file is part of OMAP DSP driver (DSP Gateway version 3.3.1)
3  *
4  * Copyright (C) 2004-2006 Nokia Corporation. All rights reserved.
5  *
6  * Contact: Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11  */
12
13 #ifndef ASM_ARCH_DSP_COMMON_H
14 #define ASM_ARCH_DSP_COMMON_H
15
16 #include <linux/clk.h>
17
18 struct dsp_kfunc_device {
19         char            *name;
20         struct clk      *fck;
21         struct clk      *ick;;
22         spinlock_t       lock;
23         int              enabled;
24         int              type;
25 #define DSP_KFUNC_DEV_TYPE_COMMON       1
26 #define DSP_KFUNC_DEV_TYPE_AUDIO        2
27
28         struct list_head        entry;
29
30         int     (*probe)(struct dsp_kfunc_device *, int);
31         int     (*remove)(struct dsp_kfunc_device *, int);
32         int     (*enable)(struct dsp_kfunc_device *, int);
33         int     (*disable)(struct dsp_kfunc_device *, int);
34 };
35
36 extern int dsp_kfunc_device_register(struct dsp_kfunc_device *);
37
38 struct dsp_platform_data {
39         struct list_head kdev_list;
40 };
41
42 struct omap_dsp {
43         struct mutex            lock;
44         int                     enabled;        /* stored peripheral status */
45         struct omap_mmu         *mmu;
46         struct omap_mbox        *mbox;
47         struct device           *dev;
48         struct list_head        *kdev_list;
49         int                     initialized;
50 };
51
52 #if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_OMAP_MMU_FWK)
53 extern void omap_dsp_request_mpui(void);
54 extern void omap_dsp_release_mpui(void);
55 extern int omap_dsp_request_mem(void);
56 extern int omap_dsp_release_mem(void);
57 #else
58 static inline int omap_dsp_request_mem(void)
59 {
60         return 0;
61 }
62 #define omap_dsp_release_mem()  do {} while (0)
63 #endif
64
65 #endif /* ASM_ARCH_DSP_COMMON_H */