usb: gadget: renesas_usbhs: remove usbhs_sys_hispeed_ctrl()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 24 Oct 2011 02:55:47 +0000 (19:55 -0700)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Dec 2011 09:44:46 +0000 (11:44 +0200)
usbhs_sys_hispeed_ctrl() can collect into usbhs_sys_host/function_ctrl().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/renesas_usbhs/common.c
drivers/usb/renesas_usbhs/common.h
drivers/usb/renesas_usbhs/mod_gadget.c
drivers/usb/renesas_usbhs/mod_host.c

index 08c679c0dde5ae110a56ec70af33819fdd20cfeb..38249da8e7b21c5557d4b092d749c2e96fb0b7dd 100644 (file)
@@ -100,11 +100,6 @@ void usbhs_sys_clock_ctrl(struct usbhs_priv *priv, int enable)
        usbhs_bset(priv, SYSCFG, SCKE, enable ? SCKE : 0);
 }
 
-void usbhs_sys_hispeed_ctrl(struct usbhs_priv *priv, int enable)
-{
-       usbhs_bset(priv, SYSCFG, HSE, enable ? HSE : 0);
-}
-
 void usbhs_sys_usb_ctrl(struct usbhs_priv *priv, int enable)
 {
        usbhs_bset(priv, SYSCFG, USBE, enable ? USBE : 0);
@@ -112,8 +107,8 @@ void usbhs_sys_usb_ctrl(struct usbhs_priv *priv, int enable)
 
 void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable)
 {
-       u16 mask = DCFM | DRPD | DPRPU;
-       u16 val  = DCFM | DRPD;
+       u16 mask = DCFM | DRPD | DPRPU | HSE;
+       u16 val  = DCFM | DRPD | HSE;
        int has_otg = usbhs_get_dparam(priv, has_otg);
 
        if (has_otg)
@@ -130,8 +125,8 @@ void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable)
 
 void usbhs_sys_function_ctrl(struct usbhs_priv *priv, int enable)
 {
-       u16 mask = DCFM | DRPD | DPRPU;
-       u16 val  = DPRPU;
+       u16 mask = DCFM | DRPD | DPRPU | HSE;
+       u16 val  = DPRPU | HSE;
 
        /*
         * if enable
index 8729da5c3be6c2dd34acf874b65eadd147b651b9..30d1887fda998ab57fc786b71271b5b30861c95b 100644 (file)
@@ -284,7 +284,6 @@ int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev);
  * sysconfig
  */
 void usbhs_sys_clock_ctrl(struct usbhs_priv *priv, int enable);
-void usbhs_sys_hispeed_ctrl(struct usbhs_priv *priv, int enable);
 void usbhs_sys_usb_ctrl(struct usbhs_priv *priv, int enable);
 void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable);
 void usbhs_sys_function_ctrl(struct usbhs_priv *priv, int enable);
index 7f4e803385702499b70e4a40fce377bc28a1e45f..f23839ddd62ccdec40e6ff4bade46d3f1fec2aa6 100644 (file)
@@ -681,7 +681,6 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status)
         * - function
         * - usb module
         */
-       usbhs_sys_hispeed_ctrl(priv, 1);
        usbhs_sys_function_ctrl(priv, 1);
        usbhs_sys_usb_ctrl(priv, 1);
 
@@ -731,7 +730,6 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status)
        gpriv->gadget.speed = USB_SPEED_UNKNOWN;
 
        /* disable sys */
-       usbhs_sys_hispeed_ctrl(priv, 0);
        usbhs_sys_function_ctrl(priv, 0);
        usbhs_sys_usb_ctrl(priv, 0);
 
index bade761a1e52b783a63dfb462f8b11ef4c111999..366a8a79fd5630cd25d964d386fb0a8b7eded11e 100644 (file)
@@ -1205,7 +1205,6 @@ static int usbhsh_start(struct usbhs_priv *priv)
         * - host
         * - usb module
         */
-       usbhs_sys_hispeed_ctrl(priv, 1);
        usbhs_sys_host_ctrl(priv, 1);
        usbhs_sys_usb_ctrl(priv, 1);
 
@@ -1242,7 +1241,6 @@ static int usbhsh_stop(struct usbhs_priv *priv)
        usb_remove_hcd(hcd);
 
        /* disable sys */
-       usbhs_sys_hispeed_ctrl(priv, 0);
        usbhs_sys_host_ctrl(priv, 0);
        usbhs_sys_usb_ctrl(priv, 0);