\r
// other haredware init\r
#ifdef CONFIG_ARCH_RK3066B\r
- //GPIO init\r
+ //GPIO init\r
rk30_mux_api_set(GPIO0D6_SPI1CLK_NAME, GPIO0D_GPIO0D6);\r
+ \r
+ gpio_request(RK3066B_OTG_DRV_VBUS, NULL);\r
+ gpio_direction_output(RK3066B_OTG_DRV_VBUS, GPIO_LOW);\r
#else\r
rk30_mux_api_set(GPIO0A5_OTGDRVVBUS_NAME, GPIO0A_OTG_DRV_VBUS);\r
#endif\r
#ifdef CONFIG_ARCH_RK3066B\r
void usb20otg_power_enable(int enable)\r
{ \r
- int ret;\r
unsigned int usbgrf_status = *(unsigned int*)(USBGRF_SOC_STATUS0);\r
if(0 == enable)//disable\r
{\r
- ret = gpio_request(RK3066B_OTG_DRV_VBUS, NULL);\r
- if (ret != 0) \r
- {\r
- gpio_free(RK3066B_OTG_DRV_VBUS);\r
- }\r
- gpio_direction_output(RK3066B_OTG_DRV_VBUS, GPIO_HIGH);\r
gpio_set_value(RK3066B_OTG_DRV_VBUS, GPIO_LOW); \r
\r
}\r
if(1 == enable)//enable\r
{\r
- ret = gpio_request(RK3066B_OTG_DRV_VBUS, NULL);\r
- if (ret != 0) {\r
- gpio_free(RK3066B_OTG_DRV_VBUS);\r
- }\r
- gpio_direction_output(RK3066B_OTG_DRV_VBUS, GPIO_HIGH);\r
gpio_set_value(RK3066B_OTG_DRV_VBUS, GPIO_HIGH); \r
} \r
}\r
// other haredware init\r
#ifdef CONFIG_ARCH_RK3066B\r
rk30_mux_api_set(GPIO0D7_SPI1CSN0_NAME, GPIO0D_GPIO0D7); \r
+ gpio_request(RK3066B_HOST_DRV_VBUS, NULL);\r
+ gpio_direction_output(RK3066B_HOST_DRV_VBUS, GPIO_HIGH);\r
#else\r
rk30_mux_api_set(GPIO0A6_HOSTDRVVBUS_NAME, GPIO0A_HOST_DRV_VBUS);\r
#endif\r
#ifdef CONFIG_ARCH_RK3066B\r
void usb20host_power_enable(int enable)\r
{ \r
- int ret;\r
+\r
if(0 == enable)//disable\r
{\r
//ret = gpio_request(RK3066B_HOST_DRV_VBUS, NULL);\r
\r
if(1 == enable)//enable\r
{\r
- ret = gpio_request(RK3066B_HOST_DRV_VBUS, NULL);\r
- if (ret != 0) {\r
- gpio_free(RK3066B_HOST_DRV_VBUS);\r
- }\r
- gpio_direction_output(RK3066B_HOST_DRV_VBUS, GPIO_HIGH);\r
gpio_set_value(RK3066B_HOST_DRV_VBUS, GPIO_HIGH);\r
//printk("!!!!!!!!!!!!!!!!!!!!!enable host power!!!!!!!!!!!!!!!!!!\n");\r
} \r