diff options
author | Felipe Balbi <balbi@ti.com> | 2015-02-26 15:20:58 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-03-10 16:33:29 -0400 |
commit | b28a6432405ca95b3da25630d79d2463c754a79c (patch) | |
tree | 9e547cd0d67ce873311ad0b264092d2850f05216 | |
parent | b4dc38fd45b63e3da2bc98db5d283a15a637a2fa (diff) |
usb: musb: rename ->reset() to ->recover()
recover is a much better name than reset, considering
we don't really reset the IP, just run platform-specific
babble recovery algorithm.
while at that, also fix a typo in comment and add kdoc
for recover memeber of platform_ops.
Tested-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/musb/musb_core.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.h | 13 | ||||
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 4 |
3 files changed, 10 insertions, 9 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 979bc2b0550f..bf9746287d7c 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1838,7 +1838,7 @@ static void musb_recover_work(struct work_struct *data) | |||
1838 | int ret; | 1838 | int ret; |
1839 | u8 devctl; | 1839 | u8 devctl; |
1840 | 1840 | ||
1841 | ret = musb_platform_reset(musb); | 1841 | ret = musb_platform_recover(musb); |
1842 | if (ret) { | 1842 | if (ret) { |
1843 | musb_enable_interrupts(musb); | 1843 | musb_enable_interrupts(musb); |
1844 | return; | 1844 | return; |
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 5e65958f7915..1e03c7ec82e4 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
@@ -160,7 +160,8 @@ struct musb_io; | |||
160 | * @init: turns on clocks, sets up platform-specific registers, etc | 160 | * @init: turns on clocks, sets up platform-specific registers, etc |
161 | * @exit: undoes @init | 161 | * @exit: undoes @init |
162 | * @set_mode: forcefully changes operating mode | 162 | * @set_mode: forcefully changes operating mode |
163 | * @try_ilde: tries to idle the IP | 163 | * @try_idle: tries to idle the IP |
164 | * @recover: platform-specific babble recovery | ||
164 | * @vbus_status: returns vbus status if possible | 165 | * @vbus_status: returns vbus status if possible |
165 | * @set_vbus: forces vbus status | 166 | * @set_vbus: forces vbus status |
166 | * @adjust_channel_params: pre check for standard dma channel_program func | 167 | * @adjust_channel_params: pre check for standard dma channel_program func |
@@ -196,7 +197,7 @@ struct musb_platform_ops { | |||
196 | void (*write_fifo)(struct musb_hw_ep *hw_ep, u16 len, const u8 *buf); | 197 | void (*write_fifo)(struct musb_hw_ep *hw_ep, u16 len, const u8 *buf); |
197 | int (*set_mode)(struct musb *musb, u8 mode); | 198 | int (*set_mode)(struct musb *musb, u8 mode); |
198 | void (*try_idle)(struct musb *musb, unsigned long timeout); | 199 | void (*try_idle)(struct musb *musb, unsigned long timeout); |
199 | int (*reset)(struct musb *musb); | 200 | int (*recover)(struct musb *musb); |
200 | 201 | ||
201 | int (*vbus_status)(struct musb *musb); | 202 | int (*vbus_status)(struct musb *musb); |
202 | void (*set_vbus)(struct musb *musb, int on); | 203 | void (*set_vbus)(struct musb *musb, int on); |
@@ -558,12 +559,12 @@ static inline void musb_platform_try_idle(struct musb *musb, | |||
558 | musb->ops->try_idle(musb, timeout); | 559 | musb->ops->try_idle(musb, timeout); |
559 | } | 560 | } |
560 | 561 | ||
561 | static inline int musb_platform_reset(struct musb *musb) | 562 | static inline int musb_platform_recover(struct musb *musb) |
562 | { | 563 | { |
563 | if (!musb->ops->reset) | 564 | if (!musb->ops->recover) |
564 | return -EINVAL; | 565 | return 0; |
565 | 566 | ||
566 | return musb->ops->reset(musb); | 567 | return musb->ops->recover(musb); |
567 | } | 568 | } |
568 | 569 | ||
569 | static inline int musb_platform_get_vbus_status(struct musb *musb) | 570 | static inline int musb_platform_get_vbus_status(struct musb *musb) |
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index a159de1225f3..30eb6ac29b81 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c | |||
@@ -600,7 +600,7 @@ static bool dsps_sw_babble_control(struct musb *musb) | |||
600 | return session_restart; | 600 | return session_restart; |
601 | } | 601 | } |
602 | 602 | ||
603 | static int dsps_musb_reset(struct musb *musb) | 603 | static int dsps_musb_recover(struct musb *musb) |
604 | { | 604 | { |
605 | struct device *dev = musb->controller; | 605 | struct device *dev = musb->controller; |
606 | struct dsps_glue *glue = dev_get_drvdata(dev->parent); | 606 | struct dsps_glue *glue = dev_get_drvdata(dev->parent); |
@@ -624,7 +624,7 @@ static struct musb_platform_ops dsps_ops = { | |||
624 | 624 | ||
625 | .try_idle = dsps_musb_try_idle, | 625 | .try_idle = dsps_musb_try_idle, |
626 | .set_mode = dsps_musb_set_mode, | 626 | .set_mode = dsps_musb_set_mode, |
627 | .reset = dsps_musb_reset, | 627 | .recover = dsps_musb_recover, |
628 | }; | 628 | }; |
629 | 629 | ||
630 | static u64 musb_dmamask = DMA_BIT_MASK(32); | 630 | static u64 musb_dmamask = DMA_BIT_MASK(32); |