diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-23 22:56:30 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 04:44:47 -0500 |
commit | 3244a7b43f13682c3323ee0d781f0cb212e8b3e7 (patch) | |
tree | 774d280aa42bafedeb101e0620f523599a49fdb0 | |
parent | 2288e109931577582f09d6295029bbf098c6f939 (diff) |
usb: gadget: renesas_usbhs: remove usbhs_sys_usb_ctrl()
usbhs_sys_usb_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 38249da8e7b2..ce54abfde006 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c | |||
@@ -100,15 +100,10 @@ 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_usb_ctrl(struct usbhs_priv *priv, int enable) | ||
104 | { | ||
105 | usbhs_bset(priv, SYSCFG, USBE, enable ? USBE : 0); | ||
106 | } | ||
107 | |||
108 | void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable) | 103 | void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable) |
109 | { | 104 | { |
110 | u16 mask = DCFM | DRPD | DPRPU | HSE; | 105 | u16 mask = DCFM | DRPD | DPRPU | HSE | USBE; |
111 | u16 val = DCFM | DRPD | HSE; | 106 | u16 val = DCFM | DRPD | HSE | USBE; |
112 | int has_otg = usbhs_get_dparam(priv, has_otg); | 107 | int has_otg = usbhs_get_dparam(priv, has_otg); |
113 | 108 | ||
114 | if (has_otg) | 109 | if (has_otg) |
@@ -125,8 +120,8 @@ void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable) | |||
125 | 120 | ||
126 | void usbhs_sys_function_ctrl(struct usbhs_priv *priv, int enable) | 121 | void usbhs_sys_function_ctrl(struct usbhs_priv *priv, int enable) |
127 | { | 122 | { |
128 | u16 mask = DCFM | DRPD | DPRPU | HSE; | 123 | u16 mask = DCFM | DRPD | DPRPU | HSE | USBE; |
129 | u16 val = DPRPU | HSE; | 124 | u16 val = DPRPU | HSE | USBE; |
130 | 125 | ||
131 | /* | 126 | /* |
132 | * if enable | 127 | * if enable |
diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h index 30d1887fda99..46c9fd2f30ed 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_usb_ctrl(struct usbhs_priv *priv, int enable); | ||
288 | void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable); | 287 | void usbhs_sys_host_ctrl(struct usbhs_priv *priv, int enable); |
289 | void usbhs_sys_function_ctrl(struct usbhs_priv *priv, int enable); | 288 | void usbhs_sys_function_ctrl(struct usbhs_priv *priv, int enable); |
290 | 289 | ||
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index f23839ddd62c..8fb9056ff48d 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c | |||
@@ -682,7 +682,6 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status) | |||
682 | * - usb module | 682 | * - usb module |
683 | */ | 683 | */ |
684 | usbhs_sys_function_ctrl(priv, 1); | 684 | usbhs_sys_function_ctrl(priv, 1); |
685 | usbhs_sys_usb_ctrl(priv, 1); | ||
686 | 685 | ||
687 | /* | 686 | /* |
688 | * enable irq callback | 687 | * enable irq callback |
@@ -731,7 +730,6 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status) | |||
731 | 730 | ||
732 | /* disable sys */ | 731 | /* disable sys */ |
733 | usbhs_sys_function_ctrl(priv, 0); | 732 | usbhs_sys_function_ctrl(priv, 0); |
734 | usbhs_sys_usb_ctrl(priv, 0); | ||
735 | 733 | ||
736 | usbhsg_pipe_disable(dcp); | 734 | usbhsg_pipe_disable(dcp); |
737 | 735 | ||
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c index 366a8a79fd56..2656d5989e68 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c | |||
@@ -1206,7 +1206,6 @@ static int usbhsh_start(struct usbhs_priv *priv) | |||
1206 | * - usb module | 1206 | * - usb module |
1207 | */ | 1207 | */ |
1208 | usbhs_sys_host_ctrl(priv, 1); | 1208 | usbhs_sys_host_ctrl(priv, 1); |
1209 | usbhs_sys_usb_ctrl(priv, 1); | ||
1210 | 1209 | ||
1211 | /* | 1210 | /* |
1212 | * enable irq callback | 1211 | * enable irq callback |
@@ -1242,7 +1241,6 @@ static int usbhsh_stop(struct usbhs_priv *priv) | |||
1242 | 1241 | ||
1243 | /* disable sys */ | 1242 | /* disable sys */ |
1244 | usbhs_sys_host_ctrl(priv, 0); | 1243 | usbhs_sys_host_ctrl(priv, 0); |
1245 | usbhs_sys_usb_ctrl(priv, 0); | ||
1246 | 1244 | ||
1247 | dev_dbg(dev, "quit host\n"); | 1245 | dev_dbg(dev, "quit host\n"); |
1248 | 1246 | ||