usb: chipidea: add flag CI_HDRC_DUAL_ROLE_NOT_OTG
Since we need otgsc to know vbus's status at some chipidea controllers even it is peripheral-only mode. Besides, some SoCs (eg, AR9331 SoC) don't have otgsc register even the DCCPARAMS_DC and DCCPARAMS_HC are both 1 at CAP_DCCPARAMS. We inroduce flag CI_HDRC_DUAL_ROLE_NOT_OTG to indicate if the controller is dual role, but not supports OTG. If this flag is not set, we follow the rule that if DCCPARAMS_DC and DCCPARAMS_HC are both 1 at CAP_DCCPARAMS, then this controller is otg capable. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
3f124d233e
commit
577b232fc9
@@ -20,6 +20,11 @@ struct ci_hdrc_platform_data {
|
||||
#define CI_HDRC_REQUIRE_TRANSCEIVER BIT(1)
|
||||
#define CI_HDRC_PULLUP_ON_VBUS BIT(2)
|
||||
#define CI_HDRC_DISABLE_STREAMING BIT(3)
|
||||
/*
|
||||
* Only set it when DCCPARAMS.DC==1 and DCCPARAMS.HC==1,
|
||||
* but otg is not supported (no register otgsc).
|
||||
*/
|
||||
#define CI_HDRC_DUAL_ROLE_NOT_OTG BIT(4)
|
||||
enum usb_dr_mode dr_mode;
|
||||
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
|
||||
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
|
||||
|
Reference in New Issue
Block a user