drivers/usb/cdns3/core: force set USB to HOST mode(VIC7100 DEBUG)

This commit is contained in:
Tom 2021-04-19 01:17:19 +08:00 committed by Fu Wei
parent 3fabe979f9
commit 51519a9340

View file

@ -18,6 +18,7 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/pm_runtime.h>
//#include <linux/gpio.h>
#include "gadget.h"
#include "core.h"
@ -89,6 +90,13 @@ static int cdns3_core_init_role(struct cdns3 *cdns)
int ret;
dr_mode = usb_get_dr_mode(dev);
#ifdef CONFIG_SOC_STARFIVE_VIC7100
dr_mode = USB_DR_MODE_HOST;
/*
if(gpio_get_value(22))
dr_mode = USB_DR_MODE_PERIPHERAL;
*/
#endif
cdns->role = USB_ROLE_NONE;
/*