usb: dwc_otg_310: fixed compilation error
[firefly-linux-kernel-4.4.55.git] / drivers / usb / dwc_otg_310 / usbdev_rk.h
old mode 100755 (executable)
new mode 100644 (file)
index 682d8a6..9066c75
@@ -19,6 +19,9 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/reset.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>
+#include <linux/rk_keys.h>
 #include <linux/rockchip/cru.h>
 #include <linux/rockchip/grf.h>
 #include <linux/rockchip/cpu.h>
@@ -34,6 +37,9 @@
 #define PHY_USB_MODE    (0)
 #define PHY_UART_MODE   (1)
 
+#define PHY_POWER_DOWN (0)
+#define PHY_POWER_UP   (1)
+
 #define USB_STATUS_BVABLID    (1)
 #define USB_STATUS_DPDM       (2)
 #define USB_STATUS_ID         (3)
@@ -52,15 +58,14 @@ enum rkusb_rst_flag {
        RST_OTHER,
 };
 
-extern void rk_send_wakeup_key(void);
 /* rk3188 platform data */
 extern struct dwc_otg_platform_data usb20otg_pdata_rk3188;
 extern struct dwc_otg_platform_data usb20host_pdata_rk3188;
-extern struct rkehci_platform_data rkhsic_pdata_rk3188;
+extern struct rkehci_platform_data rkehci_pdata_rk3188;
 /* rk3288 platform data */
 extern struct dwc_otg_platform_data usb20otg_pdata_rk3288;
 extern struct dwc_otg_platform_data usb20host_pdata_rk3288;
-extern struct rkehci_platform_data rkhsic_pdata_rk3288;
+extern struct rkehci_platform_data rkehci1_pdata_rk3288;
 extern struct rkehci_platform_data rkehci_pdata_rk3288;
 extern struct rkehci_platform_data rkohci_pdata_rk3288;
 /* rk3036 platform data */
@@ -70,6 +75,11 @@ extern struct dwc_otg_platform_data usb20host_pdata_rk3036;
 extern struct dwc_otg_platform_data usb20otg_pdata_rk3126;
 extern struct dwc_otg_platform_data usb20host_pdata_rk3126;
 extern struct dwc_otg_platform_data usb20ohci_pdata_rk3126;
+extern struct rkehci_platform_data usb20ehci_pdata_rk3126;
+/* rk3368 platform data */
+extern struct rkehci_platform_data usb20ehci_pdata_rk3368;
+extern struct dwc_otg_platform_data usb20ohci_pdata_rk3368;
+extern struct dwc_otg_platform_data usb20otg_pdata_rk3368;
 
 struct dwc_otg_platform_data {
        void *privdata;
@@ -88,13 +98,14 @@ struct dwc_otg_platform_data {
        void (*dwc_otg_uart_mode) (void *pdata, int enter_usb_uart_mode);
        void (*bc_detect_cb) (int bc_type);
        int (*get_status) (int id);
+       void (*phy_power_down)(int power_down);
 };
 
 struct rkehci_platform_data {
        struct device *dev;
-       struct clk *hclk_hsic;
-       struct clk *hsic_phy_480m;
-       struct clk *hsic_phy_12m;
+       struct clk *hclk_ehci;
+       struct clk *ehci_phy_480m;
+       struct clk *ehci_phy_12m;
        struct clk *phyclk;
        struct clk *ahbclk;
        void (*hw_init) (void);
@@ -119,6 +130,8 @@ struct dwc_otg_control_usb {
        pGRF_SOC_STATUS19_RK3288 grf_soc_status19_rk3288;
        pGRF_SOC_STATUS21_RK3288 grf_soc_status21_rk3288;
 
+       u32 grf_otg_st_offset;
+       struct regmap *grf;
        struct gpio *host_gpios;
        struct gpio *otg_gpios;
        struct clk *hclk_usb_peri;
@@ -127,6 +140,7 @@ struct dwc_otg_control_usb {
        struct wake_lock usb_wakelock;
        int remote_wakeup;
        int usb_irq_wakeup;
+       int linestate_wakeup;
        int chip_id;
 };
 
@@ -141,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