All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 09/12] tegra: video: Don't power up the SOR twice
Date: Mon, 22 May 2017 05:17:29 -0600	[thread overview]
Message-ID: <20170522111732.11265-10-sjg@chromium.org> (raw)
In-Reply-To: <20170522111732.11265-1-sjg@chromium.org>

If U-Boot is the secondary boot loader, or has been run from itself, the
SOR may already be powered up. Powering it up again causes a hang, so
detect this situation and skip it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/tegra124/sor.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/tegra124/sor.c b/drivers/video/tegra124/sor.c
index 1f5e572bda..700ab25d46 100644
--- a/drivers/video/tegra124/sor.c
+++ b/drivers/video/tegra124/sor.c
@@ -466,11 +466,20 @@ void tegra_dc_sor_set_lane_count(struct udevice *dev, u8 lane_count)
 static int tegra_dc_sor_power_up(struct udevice *dev, int is_lvds)
 {
 	struct tegra_dc_sor_data *sor = dev_get_priv(dev);
+	u32 reg;
 	int ret;
 
 	if (sor->power_is_up)
 		return 0;
 
+	/*
+	 * If for some reason it is already powered up, don't do it again.
+	 * This can happen if U-Boot is the secondary boot loader.
+	 */
+	reg = tegra_sor_readl(sor, DP_PADCTL(sor->portnum));
+	if (reg & DP_PADCTL_PD_TXD_0_NO)
+		return 0;
+
 	/* Set link bw */
 	tegra_dc_sor_set_link_bandwidth(dev, is_lvds ?
 					CLK_CNTRL_DP_LINK_SPEED_LVDS :
-- 
2.13.0.303.g4ebf302169-goog

  parent reply	other threads:[~2017-05-22 11:17 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 11:17 [U-Boot] [PATCH 00/12] tegra: nyan-big: Support chainloading and add documentation Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 01/12] arm: arm720t: Support CONFIG_SKIP_LOWLEVEL_INIT_ONLY Simon Glass
2017-05-23  1:15   ` Tom Rini
2017-05-22 11:17 ` [U-Boot] [PATCH 02/12] tegra: Init clocks even when SPL did not run Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 03/12] tegra: dts: Add cros-ec SPI settings Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 04/12] arm: Rename HCTR to HTCR Simon Glass
2017-05-23  1:15   ` Tom Rini
2017-05-22 11:17 ` [U-Boot] [PATCH 05/12] arm: Don't try to support CONFIG_ARMV7_LPAE on ARMv4T Simon Glass
2017-05-23  1:15   ` Tom Rini
2017-06-09  3:00     ` Simon Glass
2017-06-09 11:16       ` Tom Rini
2017-05-22 11:17 ` [U-Boot] [PATCH 06/12] arm: Disable LPAE if not enabled Simon Glass
2017-05-23  1:15   ` Tom Rini
2017-05-22 11:17 ` [U-Boot] [PATCH 07/12] tegra: spi: Wait a little after setting the clocks Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 08/12] tegra: nyan-big: Enable the dhrystone benchmark Simon Glass
2017-05-22 11:17 ` Simon Glass [this message]
2017-06-07 12:52   ` [U-Boot] [PATCH 09/12] tegra: video: Don't power up the SOR twice Anatolij Gustschin
2017-05-22 11:17 ` [U-Boot] [PATCH 10/12] tegra: Enable CP15 init Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 11/12] tegra: clock: Avoid a divide-by-zero error Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 12/12] README: Add instructions for chain-loading U-Boot Simon Glass
2017-05-29 13:29   ` Peter Robinson
2017-06-01  3:11     ` Simon Glass
2017-05-31 18:28 ` [U-Boot] [PATCH 00/12] tegra: nyan-big: Support chainloading and add documentation Matthew Gorski
2017-05-31 18:40   ` Matthew Gorski
2017-05-31 19:19     ` Simon Glass
2017-06-01 13:52   ` Matthew Gorski
2017-06-07 11:58     ` Simon Glass
2017-06-07 15:32       ` Tom Warren
2017-06-07 15:41         ` Stephen Warren
2017-06-09 12:27           ` Simon Glass
2017-06-27 20:09             ` Thomas Hoff
2017-07-07  3:58               ` Simon Glass
2017-07-07  7:27                 ` Thomas Hoff
2017-07-08 16:09                   ` Simon Glass
2017-07-09 13:59                     ` Tom Warren

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=20170522111732.11265-10-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.