usb: chipidea: use hrtimer for otg fsm timers
Current otg fsm timers are using controller 1ms irq and count it, this patch is to replace it with hrtimer solution, use one hrtimer for all otg timers. Signed-off-by: Li Jun <jun.li@freescale.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
2f8a467a11
commit
3a316ec4c9
@@ -162,7 +162,10 @@ struct hw_bank {
|
||||
* @role: current role
|
||||
* @is_otg: if the device is otg-capable
|
||||
* @fsm: otg finite state machine
|
||||
* @fsm_timer: pointer to timer list of otg fsm
|
||||
* @otg_fsm_hrtimer: hrtimer for otg fsm timers
|
||||
* @hr_timeouts: time out list for active otg fsm timers
|
||||
* @enabled_otg_timer_bits: bits of enabled otg timers
|
||||
* @next_otg_timer: next nearest enabled timer to be expired
|
||||
* @work: work for role changing
|
||||
* @wq: workqueue thread
|
||||
* @qh_pool: allocation pool for queue heads
|
||||
@@ -205,7 +208,10 @@ struct ci_hdrc {
|
||||
bool is_otg;
|
||||
struct usb_otg otg;
|
||||
struct otg_fsm fsm;
|
||||
struct ci_otg_fsm_timer_list *fsm_timer;
|
||||
struct hrtimer otg_fsm_hrtimer;
|
||||
ktime_t hr_timeouts[NUM_OTG_FSM_TIMERS];
|
||||
unsigned enabled_otg_timer_bits;
|
||||
enum otg_fsm_timer next_otg_timer;
|
||||
struct work_struct work;
|
||||
struct workqueue_struct *wq;
|
||||
|
||||
|
Reference in New Issue
Block a user