]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
usb: host: tegra:remove unnecessary phy api calls
authorRakesh Bodla <rbodla@nvidia.com>
Fri, 8 Mar 2013 17:42:14 +0000 (23:12 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:02:56 +0000 (13:02 -0700)
Some of the variables are passed through platform data,
no need to call phy callbacks for initialization.

Bug 1242710

Change-Id: Ic16db9c1daefb19e2ffa8cc0bd6ac4ac48fdd569
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/207634
(cherry picked from commit d578ccc61540ec39d7f090cd261172392e52436e)
Reviewed-on: http://git-master/r/209651
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
drivers/usb/host/ehci-tegra.c

index 52c978f5b528355f6a92a65feff9a2ae0844fc57..9d1f4a2cbd5adbb205bfe85b1a7c0764ed8f2066 100644 (file)
@@ -61,6 +61,7 @@ struct tegra_ehci_hcd {
        unsigned int irq;
        bool bus_suspended_fail;
        bool unaligned_dma_buf_supported;
+       bool has_hostpc;
 };
 
 struct dma_align_buffer {
@@ -316,7 +317,7 @@ static int tegra_ehci_setup(struct usb_hcd *hcd)
        /* EHCI registers start at offset 0x100 */
        ehci->caps = hcd->regs + 0x100;
 
-       ehci->has_hostpc = tegra_usb_phy_has_hostpc(tegra->phy) ? 1 : 0;
+       ehci->has_hostpc = tegra->has_hostpc;
        ehci->broken_hostpc_phcd = true;
 
 #ifndef CONFIG_ARCH_TEGRA_2x_SOC
@@ -528,6 +529,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
        tegra->irq = irq;
 
        tegra->unaligned_dma_buf_supported = pdata->unaligned_dma_buf_supported;
+       tegra->has_hostpc = pdata->has_hostpc;
 
        tegra->phy = tegra_usb_phy_open(pdev);
        if (IS_ERR(tegra->phy)) {
@@ -565,7 +567,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 
        tegra->ehci = hcd_to_ehci(hcd);
 
-       if (tegra_usb_phy_otg_supported(tegra->phy)) {
+       if (pdata->port_otg) {
                tegra->transceiver =
                        devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
                if (!IS_ERR_OR_NULL(tegra->transceiver))