* [PATCH] USB: ehci-platform: support EHCIs with transaction translator
@ 2015-05-16 15:17 Joachim Eastwood
2015-05-18 14:27 ` Alan Stern
0 siblings, 1 reply; 2+ messages in thread
From: Joachim Eastwood @ 2015-05-16 15:17 UTC (permalink / raw)
To: linux-arm-kernel
Some EHCI controllers have a Transaction Translator built into
the root hub. Support this feature in device tree when using
the ehci-platform driver by adding a feature flag for it.
This is needed to get USB working on NXP LPC18xx/43xx platforms.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
Documentation/devicetree/bindings/usb/usb-ehci.txt | 2 ++
drivers/usb/host/ehci-platform.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/usb-ehci.txt b/Documentation/devicetree/bindings/usb/usb-ehci.txt
index 0b04fdff9d5a..a12d6012a40f 100644
--- a/Documentation/devicetree/bindings/usb/usb-ehci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-ehci.txt
@@ -13,6 +13,8 @@ Optional properties:
- big-endian-desc : boolean, set this for hcds with big-endian descriptors
- big-endian : boolean, for hcds with big-endian-regs + big-endian-desc
- needs-reset-on-resume : boolean, set this to force EHCI reset after resume
+ - has-transaction-translator : boolean, set this if EHCI have a Transaction
+ Translator built into the root hub.
- clocks : a list of phandle + clock specifier pairs
- phys : phandle + phy specifier pair
- phy-names : "usb"
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index d8a75a51d6d4..ba07f16b13e0 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -202,6 +202,10 @@ static int ehci_platform_probe(struct platform_device *dev)
"needs-reset-on-resume"))
pdata->reset_on_resume = 1;
+ if (of_property_read_bool(dev->dev.of_node,
+ "has-transaction-translator"))
+ pdata->has_tt = 1;
+
priv->num_phys = of_count_phandle_with_args(dev->dev.of_node,
"phys", "#phy-cells");
priv->num_phys = priv->num_phys > 0 ? priv->num_phys : 1;
--
1.8.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] USB: ehci-platform: support EHCIs with transaction translator
2015-05-16 15:17 [PATCH] USB: ehci-platform: support EHCIs with transaction translator Joachim Eastwood
@ 2015-05-18 14:27 ` Alan Stern
0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2015-05-18 14:27 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, 16 May 2015, Joachim Eastwood wrote:
> Some EHCI controllers have a Transaction Translator built into
> the root hub. Support this feature in device tree when using
> the ehci-platform driver by adding a feature flag for it.
>
> This is needed to get USB working on NXP LPC18xx/43xx platforms.
>
> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
> ---
>
> Documentation/devicetree/bindings/usb/usb-ehci.txt | 2 ++
> drivers/usb/host/ehci-platform.c | 4 ++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/usb-ehci.txt b/Documentation/devicetree/bindings/usb/usb-ehci.txt
> index 0b04fdff9d5a..a12d6012a40f 100644
> --- a/Documentation/devicetree/bindings/usb/usb-ehci.txt
> +++ b/Documentation/devicetree/bindings/usb/usb-ehci.txt
> @@ -13,6 +13,8 @@ Optional properties:
> - big-endian-desc : boolean, set this for hcds with big-endian descriptors
> - big-endian : boolean, for hcds with big-endian-regs + big-endian-desc
> - needs-reset-on-resume : boolean, set this to force EHCI reset after resume
> + - has-transaction-translator : boolean, set this if EHCI have a Transaction
> + Translator built into the root hub.
> - clocks : a list of phandle + clock specifier pairs
> - phys : phandle + phy specifier pair
> - phy-names : "usb"
> diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
> index d8a75a51d6d4..ba07f16b13e0 100644
> --- a/drivers/usb/host/ehci-platform.c
> +++ b/drivers/usb/host/ehci-platform.c
> @@ -202,6 +202,10 @@ static int ehci_platform_probe(struct platform_device *dev)
> "needs-reset-on-resume"))
> pdata->reset_on_resume = 1;
>
> + if (of_property_read_bool(dev->dev.of_node,
> + "has-transaction-translator"))
> + pdata->has_tt = 1;
> +
> priv->num_phys = of_count_phandle_with_args(dev->dev.of_node,
> "phys", "#phy-cells");
> priv->num_phys = priv->num_phys > 0 ? priv->num_phys : 1;
Acked-by: Alan Stern <stern@rowland.harvard.edu>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-18 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-16 15:17 [PATCH] USB: ehci-platform: support EHCIs with transaction translator Joachim Eastwood
2015-05-18 14:27 ` Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).