Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364786
b: refs/heads/master
c: 225da3e
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Felipe Balbi committed Apr 2, 2013
1 parent 9a9aff0 commit 8360ebf
Show file tree
Hide file tree
Showing 7 changed files with 31 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: ef096542642874de10909f02686447a96a66ad14
refs/heads/master: 225da3e3cb1f0db9e4cb7fa2a7dc3a360d1cf788
8 changes: 6 additions & 2 deletions trunk/arch/arm/mach-shmobile/board-armadillo800eva.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static int usbhsf_get_id(struct platform_device *pdev)
return USBHS_GADGET;
}

static void usbhsf_power_ctrl(struct platform_device *pdev,
static int usbhsf_power_ctrl(struct platform_device *pdev,
void __iomem *base, int enable)
{
struct usbhsf_private *priv = usbhsf_get_priv(pdev);
Expand Down Expand Up @@ -223,6 +223,8 @@ static void usbhsf_power_ctrl(struct platform_device *pdev,
clk_disable(priv->pci); /* usb work around */
clk_disable(priv->usb24); /* usb work around */
}

return 0;
}

static int usbhsf_get_vbus(struct platform_device *pdev)
Expand All @@ -239,7 +241,7 @@ static irqreturn_t usbhsf_interrupt(int irq, void *data)
return IRQ_HANDLED;
}

static void usbhsf_hardware_exit(struct platform_device *pdev)
static int usbhsf_hardware_exit(struct platform_device *pdev)
{
struct usbhsf_private *priv = usbhsf_get_priv(pdev);

Expand All @@ -264,6 +266,8 @@ static void usbhsf_hardware_exit(struct platform_device *pdev)
priv->usbh_base = NULL;

free_irq(IRQ7, pdev);

return 0;
}

static int usbhsf_hardware_init(struct platform_device *pdev)
Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/arm/mach-shmobile/board-kzm9g.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,14 @@ static int usbhs_get_vbus(struct platform_device *pdev)
return !((1 << 7) & __raw_readw(priv->cr2));
}

static void usbhs_phy_reset(struct platform_device *pdev)
static int usbhs_phy_reset(struct platform_device *pdev)
{
struct usbhs_private *priv = usbhs_get_priv(pdev);

/* init phy */
__raw_writew(0x8a0a, priv->cr2);

return 0;
}

static int usbhs_get_id(struct platform_device *pdev)
Expand Down Expand Up @@ -202,14 +204,16 @@ static int usbhs_hardware_init(struct platform_device *pdev)
return 0;
}

static void usbhs_hardware_exit(struct platform_device *pdev)
static int usbhs_hardware_exit(struct platform_device *pdev)
{
struct usbhs_private *priv = usbhs_get_priv(pdev);

/* clear interrupt status */
__raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->phy);

free_irq(IRQ15, pdev);

return 0;
}

static u32 usbhs_pipe_cfg[] = {
Expand Down
12 changes: 9 additions & 3 deletions trunk/arch/arm/mach-shmobile/board-mackerel.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,14 @@ static int usbhs_get_vbus(struct platform_device *pdev)
return usbhs_is_connected(usbhs_get_priv(pdev));
}

static void usbhs_phy_reset(struct platform_device *pdev)
static int usbhs_phy_reset(struct platform_device *pdev)
{
struct usbhs_private *priv = usbhs_get_priv(pdev);

/* init phy */
__raw_writew(0x8a0a, priv->usbcrcaddr);

return 0;
}

static int usbhs0_get_id(struct platform_device *pdev)
Expand All @@ -628,11 +630,13 @@ static int usbhs0_hardware_init(struct platform_device *pdev)
return 0;
}

static void usbhs0_hardware_exit(struct platform_device *pdev)
static int usbhs0_hardware_exit(struct platform_device *pdev)
{
struct usbhs_private *priv = usbhs_get_priv(pdev);

cancel_delayed_work_sync(&priv->work);

return 0;
}

static struct usbhs_private usbhs0_private = {
Expand Down Expand Up @@ -735,14 +739,16 @@ static int usbhs1_hardware_init(struct platform_device *pdev)
return 0;
}

static void usbhs1_hardware_exit(struct platform_device *pdev)
static int usbhs1_hardware_exit(struct platform_device *pdev)
{
struct usbhs_private *priv = usbhs_get_priv(pdev);

/* clear interrupt status */
__raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr);

free_irq(IRQ8, pdev);

return 0;
}

static int usbhs1_get_id(struct platform_device *pdev)
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/sh/boards/mach-ecovec24/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,13 @@ static int usbhs_get_id(struct platform_device *pdev)
return gpio_get_value(GPIO_PTB3);
}

static void usbhs_phy_reset(struct platform_device *pdev)
static int usbhs_phy_reset(struct platform_device *pdev)
{
/* enable vbus if HOST */
if (!gpio_get_value(GPIO_PTB3))
gpio_set_value(GPIO_PTB5, 1);

return 0;
}

static struct renesas_usbhs_platform_info usbhs_info = {
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/usb/renesas_usbhs/mod_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static int usbhsg_recip_handler_std_clear_endpoint(struct usbhs_priv *priv,
return 0;
}

struct usbhsg_recip_handle req_clear_feature = {
static struct usbhsg_recip_handle req_clear_feature = {
.name = "clear feature",
.device = usbhsg_recip_handler_std_control_done,
.interface = usbhsg_recip_handler_std_control_done,
Expand Down Expand Up @@ -271,7 +271,7 @@ static int usbhsg_recip_handler_std_set_endpoint(struct usbhs_priv *priv,
return 0;
}

struct usbhsg_recip_handle req_set_feature = {
static struct usbhsg_recip_handle req_set_feature = {
.name = "set feature",
.device = usbhsg_recip_handler_std_set_device,
.interface = usbhsg_recip_handler_std_control_done,
Expand Down Expand Up @@ -372,7 +372,7 @@ static int usbhsg_recip_handler_std_get_endpoint(struct usbhs_priv *priv,
return 0;
}

struct usbhsg_recip_handle req_get_status = {
static struct usbhsg_recip_handle req_get_status = {
.name = "get status",
.device = usbhsg_recip_handler_std_get_device,
.interface = usbhsg_recip_handler_std_get_interface,
Expand Down
6 changes: 3 additions & 3 deletions trunk/include/linux/usb/renesas_usbhs.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,22 @@ struct renesas_usbhs_platform_callback {
* Hardware exit function for platform.
* it is called when driver was removed
*/
void (*hardware_exit)(struct platform_device *pdev);
int (*hardware_exit)(struct platform_device *pdev);

/*
* option:
*
* for board specific clock control
*/
void (*power_ctrl)(struct platform_device *pdev,
int (*power_ctrl)(struct platform_device *pdev,
void __iomem *base, int enable);

/*
* option:
*
* Phy reset for platform
*/
void (*phy_reset)(struct platform_device *pdev);
int (*phy_reset)(struct platform_device *pdev);

/*
* get USB ID function
Expand Down

0 comments on commit 8360ebf

Please sign in to comment.