diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-23 22:55:47 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 04:44:46 -0500 |
commit | 2288e109931577582f09d6295029bbf098c6f939 (patch) | |
tree | fe3a9c0d4887b034e131ece42990b704e27573b9 | |
parent | dd39c358dff41394f20b623fc68be857b6d702ad (diff) |
usb: gadget: renesas_usbhs: remove usbhs_sys_hispeed_ctrl()
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>
-rw-r--r-- | drivers/usb/renesas_usbhs/common.c | 13 | ||||
-rw-r--r-- | drivers/usb/renesas_usbhs/common.h | 1 | ||||
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_gadget.c | 2 | ||||
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_host.c | 2 |
4 files changed, 4 insertions, 14 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 08c679c0dde5..38249da8e7b2 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c | |||
@@ -100,11 +100,6 @@ void usbhs_sys_clock_ctrl(struct usbhs_priv *priv, int enable) | |||
100 | usbhs_bset(priv, SYSCFG, SCKE, enable ? SCKE : 0); | 100 | usbhs_bset(priv, SYSCFG, SCKE, enable ? SCKE : 0); |
101 | } | 101 | } |
102 | 102 | ||
103 | void usbhs_sys_hispeed_ctrl(struct usbhs_priv *priv, int enable) | ||
104 | { | ||
105 | usbhs_bset(priv, SYSCFG, HSE, enable ? HSE : 0); | ||
106 | } | ||
107 | |||
108 | void usbhs_sys_usb_ctrl(struct usbhs_priv *priv, int enable) | 103 | void usbhs_sys_usb_ctrl(struct usbhs_priv *priv, int enable) |
109 | { | 104 | { |
110 | usbhs_bset(priv, SYSCFG, USBE, enable ? USBE : 0); | 105 | usbhs_bset(priv, SYSCFG, USBE, enable ? USBE : 0); |
@@ -112,8 +107,8 @@ void usbhs_sys_usb_ctrl(struct usbhs_priv *priv, int enable) | |||
112 | 107 | ||
113 | void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable) | 108 | void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable) |
114 | { | 109 | { |
115 | u16 mask = DCFM | DRPD | DPRPU; | 110 | u16 mask = DCFM | DRPD | DPRPU | HSE; |
116 | u16 val = DCFM | DRPD; | 111 | u16 val = DCFM | DRPD | HSE; |
117 | int has_otg = usbhs_get_dparam(priv, has_otg); | 112 | int has_otg = usbhs_get_dparam(priv, has_otg); |
118 | 113 | ||
119 | if (has_otg) | 114 | if (has_otg) |
@@ -130,8 +125,8 @@ void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable) | |||
130 | 125 | ||
131 | void usbhs_sys_function_ctrl(struct usbhs_priv *priv, int enable) | 126 | void usbhs_sys_function_ctrl(struct usbhs_priv *priv, int enable) |
132 | { | 127 | { |
133 | u16 mask = DCFM | DRPD | DPRPU; | 128 | u16 mask = DCFM | DRPD | DPRPU | HSE; |
134 | u16 val = DPRPU; | 129 | u16 val = DPRPU | HSE; |
135 | 130 | ||
136 | /* | 131 | /* |
137 | * if enable | 132 | * if enable |
diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h index 8729da5c3be6..30d1887fda99 100644 --- a/drivers/usb/renesas_usbhs/common.h +++ b/drivers/usb/renesas_usbhs/common.h | |||
@@ -284,7 +284,6 @@ int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev); | |||
284 | * sysconfig | 284 | * sysconfig |
285 | */ | 285 | */ |
286 | void usbhs_sys_clock_ctrl(struct usbhs_priv *priv, int enable); | 286 | void usbhs_sys_clock_ctrl(struct usbhs_priv *priv, int enable); |
287 | void usbhs_sys_hispeed_ctrl(struct usbhs_priv *priv, int enable); | ||
288 | void usbhs_sys_usb_ctrl(struct usbhs_priv *priv, int enable); | 287 | void usbhs_sys_usb_ctrl(struct usbhs_priv *priv, int enable); |
289 | void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable); | 288 | void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable); |
290 | void usbhs_sys_function_ctrl(struct usbhs_priv *priv, int enable); | 289 | void usbhs_sys_function_ctrl(struct usbhs_priv *priv, int enable); |
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 7f4e80338570..f23839ddd62c 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c | |||
@@ -681,7 +681,6 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status) | |||
681 | * - function | 681 | * - function |
682 | * - usb module | 682 | * - usb module |
683 | */ | 683 | */ |
684 | usbhs_sys_hispeed_ctrl(priv, 1); | ||
685 | usbhs_sys_function_ctrl(priv, 1); | 684 | usbhs_sys_function_ctrl(priv, 1); |
686 | usbhs_sys_usb_ctrl(priv, 1); | 685 | usbhs_sys_usb_ctrl(priv, 1); |
687 | 686 | ||
@@ -731,7 +730,6 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status) | |||
731 | gpriv->gadget.speed = USB_SPEED_UNKNOWN; | 730 | gpriv->gadget.speed = USB_SPEED_UNKNOWN; |
732 | 731 | ||
733 | /* disable sys */ | 732 | /* disable sys */ |
734 | usbhs_sys_hispeed_ctrl(priv, 0); | ||
735 | usbhs_sys_function_ctrl(priv, 0); | 733 | usbhs_sys_function_ctrl(priv, 0); |
736 | usbhs_sys_usb_ctrl(priv, 0); | 734 | usbhs_sys_usb_ctrl(priv, 0); |
737 | 735 | ||
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c index bade761a1e52..366a8a79fd56 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c | |||
@@ -1205,7 +1205,6 @@ static int usbhsh_start(struct usbhs_priv *priv) | |||
1205 | * - host | 1205 | * - host |
1206 | * - usb module | 1206 | * - usb module |
1207 | */ | 1207 | */ |
1208 | usbhs_sys_hispeed_ctrl(priv, 1); | ||
1209 | usbhs_sys_host_ctrl(priv, 1); | 1208 | usbhs_sys_host_ctrl(priv, 1); |
1210 | usbhs_sys_usb_ctrl(priv, 1); | 1209 | usbhs_sys_usb_ctrl(priv, 1); |
1211 | 1210 | ||
@@ -1242,7 +1241,6 @@ static int usbhsh_stop(struct usbhs_priv *priv) | |||
1242 | usb_remove_hcd(hcd); | 1241 | usb_remove_hcd(hcd); |
1243 | 1242 | ||
1244 | /* disable sys */ | 1243 | /* disable sys */ |
1245 | usbhs_sys_hispeed_ctrl(priv, 0); | ||
1246 | usbhs_sys_host_ctrl(priv, 0); | 1244 | usbhs_sys_host_ctrl(priv, 0); |
1247 | usbhs_sys_usb_ctrl(priv, 0); | 1245 | usbhs_sys_usb_ctrl(priv, 0); |
1248 | 1246 | ||