Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
[pandora-kernel.git] / drivers / staging / westbridge / astoria / block / cyasblkdev_queue.h
1 /* cyanblkdev_queue.h - Antioch Linux Block Driver queue header file
2 ## ===========================
3 ## Copyright (C) 2010  Cypress Semiconductor
4 ##
5 ## This program is free software; you can redistribute it and/or
6 ## modify it under the terms of the GNU General Public License
7 ## as published by the Free Software Foundation; either version 2
8 ## of the License, or (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 51 Franklin Street, Fifth Floor
18 ## Boston, MA  02110-1301, USA.
19 ## ===========================
20 */
21
22 #ifndef _INCLUDED_CYANBLKDEV_QUEUE_H_
23 #define _INCLUDED_CYANBLKDEV_QUEUE_H_
24
25 /*
26  * may contain various useful MACRO and debug printks
27  */
28
29 /* moved to staging location, eventual implementation
30  * considered is here
31  * #include <linux/westbridge/cyashal.h>
32  * #include <linux/westbridge/cyastoria.h>
33  * */
34
35 #include "../include/linux/westbridge/cyashal.h"
36 #include "../include/linux/westbridge/cyastoria.h"
37
38 struct request;
39 struct task_struct;
40
41 struct cyasblkdev_queue {
42         struct completion       thread_complete;
43         wait_queue_head_t       thread_wq;
44         struct semaphore        thread_sem;
45         unsigned int    flags;
46         struct request  *req;
47         int     (*prep_fn)(struct cyasblkdev_queue *, struct request *);
48         int     (*issue_fn)(struct cyasblkdev_queue *, struct request *);
49         void            *data;
50         struct request_queue *queue;
51 };
52
53 extern int cyasblkdev_init_queue(struct cyasblkdev_queue *, spinlock_t *);
54 extern void cyasblkdev_cleanup_queue(struct cyasblkdev_queue *);
55 extern void cyasblkdev_queue_suspend(struct cyasblkdev_queue *);
56 extern void cyasblkdev_queue_resume(struct cyasblkdev_queue *);
57
58 extern cy_as_device_handle cyasdevice_getdevhandle(void);
59 #define MOD_LOGS 1
60 void verbose_rq_flags(int flags);
61
62 #endif /* _INCLUDED_CYANBLKDEV_QUEUE_H_ */
63
64 /*[]*/