upload tizen1.0 source
[kernel/linux-2.6.36.git] / arch / arm / plat-s5p / include / plat / s5p-otghost.h
1 /* linux/arch/arm/plat-s5p/include/plat/s5p-otghost.h
2  *
3  * Copyright 2010 Samsung Electronics Co., Ltd.
4  *              http://www.samsung.com/
5  *
6  * Platform header file for Samsung OTG Host driver
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 #ifndef _PLAT_S5P_OTGHOST_H
13 #define _PLAT_S5P_OTGHOST_H __FILE__
14
15 #include <linux/wakelock.h>
16
17 /*#define CONFIG_USB_S3C_OTG_HOST_HANDLING_CLOCK*/
18 #define CONFIG_USB_S3C_OTG_HOST_DTGDRVVBUS
19
20 union port_flags_t {
21         /** raw register data */
22         u32 d32;
23         /** register bits */
24         struct {
25                 unsigned port_connect_status_change:1;
26                 unsigned port_connect_status:1;
27                 unsigned port_reset_change:1;
28                 unsigned port_enable_change:1;
29                 unsigned port_suspend_change:1;
30                 unsigned port_over_current_change:1;
31                 unsigned reserved:26;
32         } b;
33 };
34
35 struct sec_otghost_data {
36         bool clk_usage;
37         void (*set_pwr_cb)(int on);
38         int host_notify;
39         int sec_whlist_table_num;
40 };
41
42 struct sec_otghost {
43         spinlock_t lock;
44
45         bool ch_halt;
46         union port_flags_t port_flag;
47
48         struct work_struct work;
49         struct workqueue_struct *wq;
50
51         struct sec_otghost_data *otg_data;
52 };
53
54 /* defined by architecture to configure gpio */
55 extern void s5p_otg_power_cb(int enable);
56
57 #endif /*_PLAT_S5P_OTGHOST_H */