From: Thierry Reding <thierry.reding@gmail.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>, JC Kuo <jckuo@nvidia.com>,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/5] phy: tegra: xusb: Skip single function lane programming
Date: Thu, 21 Feb 2019 16:46:31 +0100 [thread overview]
Message-ID: <20190221154634.10684-3-thierry.reding@gmail.com> (raw)
In-Reply-To: <20190221154634.10684-1-thierry.reding@gmail.com>
From: JC Kuo <jckuo@nvidia.com>
Tegra186 USB2 pads and USB3 pads do not have hardware mux for changing
the pad function. For such "lanes", we can skip the lane mux register
programming.
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/phy/tegra/xusb.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index 5b3b8863363e..e3bc60cfe6a1 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -313,6 +313,10 @@ static void tegra_xusb_lane_program(struct tegra_xusb_lane *lane)
const struct tegra_xusb_lane_soc *soc = lane->soc;
u32 value;
+ /* skip single function lanes */
+ if (soc->num_funcs < 2)
+ return;
+
/* choose function */
value = padctl_readl(padctl, soc->offset);
value &= ~(soc->mask << soc->shift);
--
2.20.1
next prev parent reply other threads:[~2019-02-21 15:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 15:46 [PATCH v2 0/5] phy: tegra: xusb: Add Tegra186 support Thierry Reding
2019-02-21 15:46 ` [PATCH v2 1/5] dt-bindings: phy: tegra: " Thierry Reding
2019-02-22 23:39 ` Rob Herring
2019-02-21 15:46 ` Thierry Reding [this message]
2019-02-21 15:46 ` [PATCH v2 3/5] phy: tegra: xusb: Parse dual-role mode property Thierry Reding
2019-02-21 15:46 ` [PATCH v2 4/5] phy: tegra: xusb: Add support for power supplies Thierry Reding
2019-02-21 15:46 ` [PATCH v2 5/5] phy: tegra: xusb: Add Tegra186 support Thierry Reding
2019-03-18 8:56 ` [PATCH v2 0/5] " Kishon Vijay Abraham I
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190221154634.10684-3-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=jckuo@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox