]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
xhci: tegra: keep HSIC in RESET during probe()
authorMark Kuo <mkuo@nvidia.com>
Tue, 11 Nov 2014 05:52:00 +0000 (13:52 +0800)
committerAshutosh Jha <ajha@nvidia.com>
Fri, 19 Dec 2014 01:55:14 +0000 (17:55 -0800)
Keep HSIC bus in RESET state during XHCI probe. HSIC bus will only be
kept in IDLE after manually turning on HSIC power via hsicX_power sysfs
node.

Bug 200039977

Change-Id: I22845f9cfb1e9224ef67eb549c0e50ebe137427b
Signed-off-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-on: http://git-master/r/594845
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Tested-by: Ashutosh Jha <ajha@nvidia.com>
drivers/usb/host/xhci-tegra-t210-padctl.c
drivers/usb/host/xhci-tegra.c

index 4ff3a4d214233dae072deabcef9bfb70f2de7e65..3567a5f32c86c1b9bc5105e3a022dcae9fc5e9c2 100644 (file)
@@ -120,10 +120,10 @@ int t210_hsic_pad_enable(struct tegra_xhci_hcd *tegra, u8 pad)
        tegra_prod_set_by_name(&tegra->base_list[0], prod_name,
                                tegra->prod_list);
 
-       /* keep HSIC in IDLE */
+       /* keep HSIC in RESET */
        mask = RPD_DATA | RPD_STROBE | RPU_DATA | RPU_STROBE;
        mask |= PD_RX | PD_ZI | PD_TX;
-       val = RPD_DATA | RPU_STROBE;
+       val = RPD_DATA | RPD_STROBE;
        tegra_usb_pad_reg_update(HSIC_PAD_CTL_0(pad), mask, val);
 
        hsic_trk_enable();
index 0cf0ec2d8aac6a153a92285ab18cfe79374772ba..6d38ee74025334b8fd8d4f3a867e7027f25d6bb0 100644 (file)
@@ -2361,8 +2361,6 @@ static int load_firmware(struct tegra_xhci_hcd *tegra, bool resetARU)
                dev_err(&pdev->dev, "Controller not ready\n");
                return -EFAULT;
        }
-       for_each_enabled_hsic_pad(pad, tegra)
-               hsic_pad_pupd_set(tegra, pad, PUPD_IDLE);
 
        return 0;
 }
@@ -2829,6 +2827,7 @@ tegra_xhci_host_partition_elpg_exit(struct tegra_xhci_hcd *tegra)
        const struct tegra_xusb_padctl_regs *padregs = tegra->padregs;
        struct xhci_hcd *xhci = tegra->xhci;
        int ret = 0;
+       int pad;
 
        must_have_sync_lock(tegra);
 
@@ -2933,6 +2932,8 @@ tegra_xhci_host_partition_elpg_exit(struct tegra_xhci_hcd *tegra)
                        __func__, ret);
                goto out;
        }
+       for_each_enabled_hsic_pad(pad, tegra)
+               hsic_pad_pupd_set(tegra, pad, PUPD_IDLE);
 
        pmc_disable_bus_ctrl(tegra);