usb: dwc_otg_310: fixed compilation error
authorFrank Wang <frank.wang@rock-chips.com>
Mon, 27 Mar 2017 03:31:35 +0000 (11:31 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 27 Mar 2017 10:31:46 +0000 (18:31 +0800)
Change-Id: I5f501184c11d25493f6855d994e32c1043371161
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
drivers/usb/dwc_otg_310/dwc_otg_cil_intr.c [changed mode: 0755->0644]
drivers/usb/dwc_otg_310/dwc_otg_driver.c
drivers/usb/dwc_otg_310/usbdev_rk.h
drivers/usb/dwc_otg_310/usbdev_rk32.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 9e25e90..2ffba2c
@@ -507,7 +507,7 @@ static inline void rk_dwc_otg_phy_soft_reset(dwc_otg_core_if_t *core_if)
        pldata = core_if->otg_dev->pldata;
        guid.d32 = core_if->core_global_regs->guid;
 
-       if ((cpu_is_rk3288()) && ((guid.d32 & 0x01) == 0)) {
+       if ((is_rk3288_usb()) && ((guid.d32 & 0x01) == 0)) {
                /* only used for HOST20, OTG HOST do not need.
                 * first, do soft reset usb phy, and then usb phy
                 * can drive resume signal.
index b2d5b7f8b04abfc898145890c165d93d6fe2fd65..b5dc5a5f2cb0d055d31ef2830e979eadcb7e7abd 100644 (file)
@@ -1626,7 +1626,7 @@ void rk_usb_power_up(void)
        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,
@@ -1682,7 +1682,7 @@ void rk_usb_power_down(void)
        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 =
index 1839d89dea316c6a3c00abf78b87738edc815f09..9066c75033da38923d5027a2a2a164d8f57bd315 100644 (file)
@@ -155,4 +155,13 @@ struct rkehci_pdata_id {
        char name[32];
        struct rkehci_platform_data *pdata;
 };
+
+#ifdef CONFIG_ARM
+int is_rk3288_usb(void);
+#else
+static inline int is_rk3288_usb(void)
+{
+       return false;
+}
+#endif
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index 673b118..b494a55
@@ -4,6 +4,14 @@
 #include "dwc_otg_regs.h"
 static struct dwc_otg_control_usb *control_usb;
 
+int is_rk3288_usb(void)
+{
+       if (!control_usb)
+               return false;
+
+       return control_usb->chip_id == RK3288_USB_CTLR ? true : false;
+}
+
 #ifdef CONFIG_USB20_OTG
 static void usb20otg_hw_init(void)
 {