summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/otg.h
diff options
context:
space:
mode:
authorLi Jun <b47624@freescale.com>2014-04-23 15:56:38 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-24 12:56:34 -0700
commit0c33bf781a0da4bdab207ccc323c9afa940852af (patch)
tree944dc5e1c996ff80edce93442ec462be3fedfbfa /drivers/usb/chipidea/otg.h
parentd03cccff9c768342d9576dde744ab3acb69d3ad4 (diff)
usb: chipidea: operate on otgsc register in a general way
Use a more general way to read and write otgsc register. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <b47624@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/otg.h')
-rw-r--r--drivers/usb/chipidea/otg.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/usb/chipidea/otg.h b/drivers/usb/chipidea/otg.h
index 449bee07f4fe..734926754113 100644
--- a/drivers/usb/chipidea/otg.h
+++ b/drivers/usb/chipidea/otg.h
@@ -11,22 +11,8 @@
#ifndef __DRIVERS_USB_CHIPIDEA_OTG_H
#define __DRIVERS_USB_CHIPIDEA_OTG_H
-static inline void ci_clear_otg_interrupt(struct ci_hdrc *ci, u32 bits)
-{
- /* Only clear request bits */
- hw_write(ci, OP_OTGSC, OTGSC_INT_STATUS_BITS, bits);
-}
-
-static inline void ci_enable_otg_interrupt(struct ci_hdrc *ci, u32 bits)
-{
- hw_write(ci, OP_OTGSC, bits | OTGSC_INT_STATUS_BITS, bits);
-}
-
-static inline void ci_disable_otg_interrupt(struct ci_hdrc *ci, u32 bits)
-{
- hw_write(ci, OP_OTGSC, bits | OTGSC_INT_STATUS_BITS, 0);
-}
-
+u32 hw_read_otgsc(struct ci_hdrc *ci, u32 mask);
+void hw_write_otgsc(struct ci_hdrc *ci, u32 mask, u32 data);
int ci_hdrc_otg_init(struct ci_hdrc *ci);
void ci_hdrc_otg_destroy(struct ci_hdrc *ci);
enum ci_role ci_otg_role(struct ci_hdrc *ci);