usb: dwc_otg_310: add rk3288 usb otg support
[firefly-linux-kernel-4.4.55.git] / drivers / usb / dwc_otg_310 / dwc_otg_driver.c
index b2d5b7f8b04abfc898145890c165d93d6fe2fd65..9905a393d6d6e9025401e3b64278ed561b2af19c 100644 (file)
@@ -1621,12 +1621,14 @@ static struct platform_driver dwc_otg_driver = {
 void rk_usb_power_up(void)
 {
        struct dwc_otg_platform_data *pldata_otg;
+#ifdef CONFIG_USB20_HOST
        struct dwc_otg_platform_data *pldata_host;
+#endif
 #ifdef CONFIG_USB_EHCI_RK
        struct rkehci_platform_data *pldata_ehci;
 #endif
 
-       if (cpu_is_rk3288()) {
+       if (is_rk3288_usb()) {
 #ifdef CONFIG_RK_USB_UART
                /* enable USB bypass UART function  */
                writel_relaxed(0x00c00000 | usb_to_uart_status,
@@ -1677,12 +1679,14 @@ void rk_usb_power_up(void)
 void rk_usb_power_down(void)
 {
        struct dwc_otg_platform_data *pldata_otg;
+#ifdef CONFIG_USB20_HOST
        struct dwc_otg_platform_data *pldata_host;
+#endif
 #ifdef CONFIG_USB_EHCI_RK
        struct rkehci_platform_data *pldata_ehci;
 #endif
 
-       if (cpu_is_rk3288()) {
+       if (is_rk3288_usb()) {
 #ifdef CONFIG_RK_USB_UART
                /* disable USB bypass UART function */
                usb_to_uart_status =