aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-12-26 13:33:05 -0500
committerOlof Johansson <olof@lixom.net>2013-12-26 13:33:05 -0500
commite7d248f0e0f93b86c56466ede82c46234f622615 (patch)
tree36adb8e2ff0b4cc570334372389f82a73e352002 /drivers/usb
parent1c7af42fe579b5cf8c942319cbed38801305dda4 (diff)
parent8a0a1af30cbf56b41220a02e34835022c4d72f41 (diff)
Merge tag 'tegra-for-3.14-dmas-resets-rework' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/cleanup
From Stephen Warren: ARM: tegra: implement common DMA and resets DT bindings This series converts the Tegra DTs and drivers to use the common/ standard DMA and reset bindings, rather than custom bindings. It also adds complete documentation for the Tegra clock bindings without actually changing any binding definitions. This conversion relies on a few sets of patches in branches from outside the Tegra tree: 1) A patch to add an DMA channel request API which allows deferred probe to be implemented. 2) A patch to implement a common part of the of_xlate function for DMA controllers. 3) Some ASoC patches (which in turn rely on (1) above), which support deferred probe during DMA channel allocation. 4) The Tegra clock driver changes for 3.14. Consequently, this branch is based on a merge of all of those external branches. In turn, this branch is or will be pulled into a few places that either rely on features introduced here, or would otherwise conflict with the patches: a) Tegra's own for-3.14/powergate and for-4.14/dt branches, to avoid conflicts. b) The DRM tree, which introduces new code that relies on the reset controller framework introduced in this branch, and to avoid conflicts. * tag 'tegra-for-3.14-dmas-resets-rework' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (30 commits) spi: tegra: checking for ERR_PTR instead of NULL ASoC: tegra: update module reset list for Tegra124 clk: tegra: remove bogus PCIE_XCLK clk: tegra: remove legacy reset APIs ARM: tegra: remove legacy DMA entries from DT ARM: tegra: remove legacy clock entries from DT USB: EHCI: tegra: use reset framework Input: tegra-kbc - use reset framework serial: tegra: convert to standard DMA DT bindings serial: tegra: use reset framework spi: tegra: convert to standard DMA DT bindings spi: tegra: use reset framework staging: nvec: use reset framework i2c: tegra: use reset framework ASoC: tegra: convert to standard DMA DT bindings ASoC: tegra: allocate AHUB FIFO during probe() not startup() ASoC: tegra: call pm_runtime APIs around register accesses ASoC: tegra: use reset framework dma: tegra: register as an OF DMA controller dma: tegra: use reset framework ... Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-tegra.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index b9fd0396011e..6f7e23dd1417 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -17,7 +17,6 @@
17 */ 17 */
18 18
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <linux/clk/tegra.h>
21#include <linux/dma-mapping.h> 20#include <linux/dma-mapping.h>
22#include <linux/err.h> 21#include <linux/err.h>
23#include <linux/gpio.h> 22#include <linux/gpio.h>
@@ -29,6 +28,7 @@
29#include <linux/of_gpio.h> 28#include <linux/of_gpio.h>
30#include <linux/platform_device.h> 29#include <linux/platform_device.h>
31#include <linux/pm_runtime.h> 30#include <linux/pm_runtime.h>
31#include <linux/reset.h>
32#include <linux/slab.h> 32#include <linux/slab.h>
33#include <linux/usb/ehci_def.h> 33#include <linux/usb/ehci_def.h>
34#include <linux/usb/tegra_usb_phy.h> 34#include <linux/usb/tegra_usb_phy.h>
@@ -62,6 +62,7 @@ static int (*orig_hub_control)(struct usb_hcd *hcd,
62struct tegra_ehci_hcd { 62struct tegra_ehci_hcd {
63 struct tegra_usb_phy *phy; 63 struct tegra_usb_phy *phy;
64 struct clk *clk; 64 struct clk *clk;
65 struct reset_control *rst;
65 int port_resuming; 66 int port_resuming;
66 bool needs_double_reset; 67 bool needs_double_reset;
67 enum tegra_usb_phy_port_speed port_speed; 68 enum tegra_usb_phy_port_speed port_speed;
@@ -385,13 +386,20 @@ static int tegra_ehci_probe(struct platform_device *pdev)
385 goto cleanup_hcd_create; 386 goto cleanup_hcd_create;
386 } 387 }
387 388
389 tegra->rst = devm_reset_control_get(&pdev->dev, "usb");
390 if (IS_ERR(tegra->rst)) {
391 dev_err(&pdev->dev, "Can't get ehci reset\n");
392 err = PTR_ERR(tegra->rst);
393 goto cleanup_hcd_create;
394 }
395
388 err = clk_prepare_enable(tegra->clk); 396 err = clk_prepare_enable(tegra->clk);
389 if (err) 397 if (err)
390 goto cleanup_hcd_create; 398 goto cleanup_hcd_create;
391 399
392 tegra_periph_reset_assert(tegra->clk); 400 reset_control_assert(tegra->rst);
393 udelay(1); 401 udelay(1);
394 tegra_periph_reset_deassert(tegra->clk); 402 reset_control_deassert(tegra->rst);
395 403
396 u_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0); 404 u_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0);
397 if (IS_ERR(u_phy)) { 405 if (IS_ERR(u_phy)) {