1 /* cyanblkdev_queue.h - Antioch Linux Block Driver queue header file
2 ## ===========================
3 ## Copyright (C) 2010 Cypress Semiconductor
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.
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.
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 ## ===========================
22 #ifndef _INCLUDED_CYANBLKDEV_QUEUE_H_
23 #define _INCLUDED_CYANBLKDEV_QUEUE_H_
26 * may contain various useful MACRO and debug printks
29 /* moved to staging location, eventual implementation
31 * #include <linux/westbridge/cyashal.h>
32 * #include <linux/westbridge/cyastoria.h>
35 #include "../include/linux/westbridge/cyashal.h"
36 #include "../include/linux/westbridge/cyastoria.h"
41 struct cyasblkdev_queue {
42 struct completion thread_complete;
43 wait_queue_head_t thread_wq;
44 struct semaphore thread_sem;
47 int (*prep_fn)(struct cyasblkdev_queue *, struct request *);
48 int (*issue_fn)(struct cyasblkdev_queue *, struct request *);
50 struct request_queue *queue;
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 *);
58 extern cy_as_device_handle cyasdevice_getdevhandle(void);
60 void verbose_rq_flags(int flags);
62 #endif /* _INCLUDED_CYANBLKDEV_QUEUE_H_ */