From 03372d9c9372a68957cb321a9b68029176d74833 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Mon, 6 Feb 2012 18:19:06 +0530 Subject: tegra: usb: host: Clean-up hsic device connection retries usb_phy is handling conenction with hsic device. Removing hsic conenction re-tries logic from ehci_tegra. Bug 932606 Change-Id: I7bdea39966eb66d4cb8271d913c449dfa1ff4b2f Signed-off-by: Seshendra Gadagottu Reviewed-on: http://git-master/r/82758 (cherry picked from commit 5e3c81372ffb2601cc9f078111b90aba03a7b1f0) Reviewed-on: http://git-master/r/87502 Reviewed-by: Venkat Moganty --- drivers/usb/host/ehci-tegra.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 030b03b55dff..36f6630b6fe3 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -47,7 +47,6 @@ #define STS_SRI (1<<7) /* SOF Recieved */ -#define TEGRA_HSIC_CONNECTION_MAX_RETRIES 5 #define HOSTPC_REG_OFFSET 0x1b4 #define HOSTPC1_DEVLC_STS (1 << 28) @@ -65,13 +64,11 @@ struct tegra_ehci_hcd { int port_resuming; int power_down_on_bus_suspend; int default_enable; - struct delayed_work work; enum tegra_usb_phy_port_speed port_speed; struct work_struct clk_timer_work; struct timer_list clk_timer; bool clock_enabled; bool timer_event; - int hsic_connect_retries; struct mutex tegra_ehci_hcd_mutex; unsigned int irq; }; @@ -698,9 +695,8 @@ restart: tegra_ehci_restart(hcd, false); tegra_usb_phy_bus_idle(tegra->phy); - tegra->hsic_connect_retries = 0; if (!tegra_usb_phy_is_device_connected(tegra->phy)) - schedule_delayed_work(&tegra->work, 50); + pr_err("%s: no hsic device conenction\n", __func__); } else { tegra_ehci_restart(hcd, false); } @@ -932,23 +928,6 @@ static void tegra_ehci_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) free_temp_buffer(urb); } -static void tegra_hsic_connection_work(struct work_struct *work) -{ - struct tegra_ehci_hcd *tegra = - container_of(work, struct tegra_ehci_hcd, work.work); - if (tegra_usb_phy_is_device_connected(tegra->phy)) { - cancel_delayed_work(&tegra->work); - return; - } - /* Few cases HSIC device may not be connected, so * - ** skip this check after configured max re-tries. */ - if (tegra->hsic_connect_retries++ > TEGRA_HSIC_CONNECTION_MAX_RETRIES) - return; - - schedule_delayed_work(&tegra->work, jiffies + msecs_to_jiffies(50)); - return; -} - void clk_timer_callback(unsigned long data) { struct tegra_ehci_hcd *tegra = (struct tegra_ehci_hcd*) data; @@ -1158,8 +1137,6 @@ static int tegra_ehci_probe(struct platform_device *pdev) goto fail_io; } - INIT_DELAYED_WORK(&tegra->work, tegra_hsic_connection_work); - INIT_WORK(&tegra->clk_timer_work, clk_timer_work_handler); tegra->phy = tegra_usb_phy_open(instance, hcd->regs, pdata->phy_config, @@ -1314,7 +1291,6 @@ static int tegra_ehci_remove(struct platform_device *pdev) disable_irq_wake(tegra->irq); usb_remove_hcd(hcd); usb_put_hcd(hcd); - cancel_delayed_work(&tegra->work); tegra_usb_phy_power_off(tegra->phy, true); tegra_usb_phy_close(tegra->phy); iounmap(hcd->regs); -- cgit v1.2.3