Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280855
b: refs/heads/master
c: 2288e10
h: refs/heads/master
i:
  280853: 595f7a9
  280851: a9f297b
  280847: 842d0d3
v: v3
  • Loading branch information
Kuninori Morimoto authored and Felipe Balbi committed Dec 12, 2011
1 parent 916a93b commit 00841e5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd39c358dff41394f20b623fc68be857b6d702ad
refs/heads/master: 2288e109931577582f09d6295029bbf098c6f939
13 changes: 4 additions & 9 deletions trunk/drivers/usb/renesas_usbhs/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,15 @@ 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);
}

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)
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/renesas_usbhs/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/usb/renesas_usbhs/mod_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/usb/renesas_usbhs/mod_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 00841e5

Please sign in to comment.