usb: ehci: add rockchip relinquishing port quirk support
[firefly-linux-kernel-4.4.55.git] / drivers / rk_nand / rk_nand_blk.h
1 /*
2  * Copyright (c) 2016, Fuzhou Rockchip Electronics Co., Ltd
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  */
9
10 #ifndef __RKNAND_BLK_H
11 #define __RKNAND_BLK_H
12
13 #include <linux/semaphore.h>
14
15 #define MAX_PART_COUNT 32
16
17 struct nand_part {
18         unsigned char name[32];
19         unsigned long offset;
20         unsigned long size;
21         unsigned char type;
22 };
23
24 struct nand_blk_dev {
25         struct nand_blk_ops *nandr;
26         struct list_head list;
27         int devnum;
28         unsigned long size;
29         unsigned long off_size;
30         int readonly;
31         int writeonly;
32         int disable_access;
33         void *blkcore_priv;
34 };
35
36 struct nand_blk_ops {
37         char *name;
38         int major;
39         int minorbits;
40         int last_dev_index;
41         struct completion thread_exit;
42         int quit;
43         int nand_th_quited;
44         wait_queue_head_t thread_wq; /* thread wait queue */
45         struct request_queue *rq;
46         spinlock_t queue_lock; /* queue lock */
47         struct list_head devs;
48         struct module *owner;
49 };
50
51 void rknand_dev_suspend(void);
52 void rknand_dev_resume(void);
53 void rknand_dev_shutdown(void);
54 void rknand_dev_flush(void);
55 int __init rknand_dev_init(void);
56 int rknand_dev_exit(void);
57
58 #endif