diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-mailbox.h')
-rw-r--r-- | drivers/media/video/cx18/cx18-mailbox.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-mailbox.h b/drivers/media/video/cx18/cx18-mailbox.h index d995641536b3..ce2b6686aa00 100644 --- a/drivers/media/video/cx18/cx18-mailbox.h +++ b/drivers/media/video/cx18/cx18-mailbox.h | |||
@@ -2,6 +2,7 @@ | |||
2 | * cx18 mailbox functions | 2 | * cx18 mailbox functions |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl> | 4 | * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl> |
5 | * Copyright (C) 2008 Andy Walls <awalls@radix.net> | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -30,8 +31,24 @@ | |||
30 | #define MB_RESERVED_HANDLE_0 0 | 31 | #define MB_RESERVED_HANDLE_0 0 |
31 | #define MB_RESERVED_HANDLE_1 0xFFFFFFFF | 32 | #define MB_RESERVED_HANDLE_1 0xFFFFFFFF |
32 | 33 | ||
34 | #define APU 0 | ||
35 | #define CPU 1 | ||
36 | #define EPU 2 | ||
37 | #define HPU 3 | ||
38 | |||
33 | struct cx18; | 39 | struct cx18; |
34 | 40 | ||
41 | /* | ||
42 | * This structure is used by CPU to provide completed buffers information | ||
43 | * Its structure is dictrated by the layout of the SCB, required by the | ||
44 | * firmware, but its defintion needs to be here, instead of in cx18-scb.h, | ||
45 | * for mailbox work order scheduling | ||
46 | */ | ||
47 | struct cx18_mdl_ack { | ||
48 | u32 id; /* ID of a completed MDL */ | ||
49 | u32 data_used; /* Total data filled in the MDL for buffer 'id' */ | ||
50 | }; | ||
51 | |||
35 | /* The cx18_mailbox struct is the mailbox structure which is used for passing | 52 | /* The cx18_mailbox struct is the mailbox structure which is used for passing |
36 | messages between processors */ | 53 | messages between processors */ |
37 | struct cx18_mailbox { | 54 | struct cx18_mailbox { |
@@ -62,12 +79,22 @@ struct cx18_mailbox { | |||
62 | u32 error; | 79 | u32 error; |
63 | }; | 80 | }; |
64 | 81 | ||
82 | struct cx18_stream; | ||
83 | |||
84 | struct cx18_api_func_private { | ||
85 | struct cx18 *cx; | ||
86 | struct cx18_stream *s; | ||
87 | }; | ||
88 | |||
65 | int cx18_api(struct cx18 *cx, u32 cmd, int args, u32 data[]); | 89 | int cx18_api(struct cx18 *cx, u32 cmd, int args, u32 data[]); |
66 | int cx18_vapi_result(struct cx18 *cx, u32 data[MAX_MB_ARGUMENTS], u32 cmd, | 90 | int cx18_vapi_result(struct cx18 *cx, u32 data[MAX_MB_ARGUMENTS], u32 cmd, |
67 | int args, ...); | 91 | int args, ...); |
68 | int cx18_vapi(struct cx18 *cx, u32 cmd, int args, ...); | 92 | int cx18_vapi(struct cx18 *cx, u32 cmd, int args, ...); |
69 | int cx18_api_func(void *priv, u32 cmd, int in, int out, | 93 | int cx18_api_func(void *priv, u32 cmd, int in, int out, |
70 | u32 data[CX2341X_MBOX_MAX_DATA]); | 94 | u32 data[CX2341X_MBOX_MAX_DATA]); |
71 | long cx18_mb_ack(struct cx18 *cx, const struct cx18_mailbox *mb); | 95 | |
96 | void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu); | ||
97 | |||
98 | void cx18_epu_work_handler(struct work_struct *work); | ||
72 | 99 | ||
73 | #endif | 100 | #endif |