From patchwork Sat May 16 15:17:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joachim Eastwood X-Patchwork-Id: 6421891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E7D8B9F1CC for ; Sat, 16 May 2015 15:20:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 19282205D3 for ; Sat, 16 May 2015 15:20:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 30421205CD for ; Sat, 16 May 2015 15:20:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ytdqu-0004Xt-Rh; Sat, 16 May 2015 15:18:12 +0000 Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ytdqq-0004Tp-VH for linux-arm-kernel@lists.infradead.org; Sat, 16 May 2015 15:18:09 +0000 Received: by lagr1 with SMTP id r1so81009315lag.0 for ; Sat, 16 May 2015 08:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=gifCumm9YY8zjQBlxzWLS2NwNXQAMe3sBvqCZNI9u84=; b=CR2OTz8FyLFh6i2KWZXfnBfDmJVL+DAkLHztaz7cN1pjmeFX9nHhL8G9vuMOmcio65 sKJZF1Ad6RJyQOlVkxhApb4m8f8LFFK/Xf0MBwjafWJjri6B0FVhqDjZQ2gpyBVzUOFq bC3AW43IlcuIWSi4MXYyyR0pgQyb0r/3a5hbMROSNHPFawzJOyMkOpRQF2JRPx0L/56e Ndo+bUzo97ZrSYVvMMe4frTnfVcUoo7EJTKCeGzRvBKuyZo6jTis2/z/ju1ov8BVF3QG i6927GlN0/6BXlcjdcqL1lFaUPQaPxbQJXXj8yqcNqvAD5doQenfS7XyenJ8pI2lcdAm rHWw== X-Received: by 10.112.163.168 with SMTP id yj8mr11064124lbb.36.1431789465849; Sat, 16 May 2015 08:17:45 -0700 (PDT) Received: from localhost.localdomain ([90.149.48.183]) by mx.google.com with ESMTPSA id w10sm1205416laz.6.2015.05.16.08.17.44 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 16 May 2015 08:17:45 -0700 (PDT) From: Joachim Eastwood To: stern@rowland.harvard.edu, gregkh@linuxfoundation.org Subject: [PATCH] USB: ehci-platform: support EHCIs with transaction translator Date: Sat, 16 May 2015 17:17:40 +0200 Message-Id: <1431789460-26831-1-git-send-email-manabian@gmail.com> X-Mailer: git-send-email 1.8.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150516_081809_214158_8A47CB5B X-CRM114-Status: GOOD ( 11.55 ) X-Spam-Score: -0.8 (/) Cc: linux@prisktech.co.nz, devicetree@vger.kernel.org, Joachim Eastwood , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Alan Stern --- 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;