public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: tegra: only enable SCU on Tegra20
@ 2013-05-23 22:26 Stephen Warren
  2013-06-04 19:33 ` Stephen Warren
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Warren @ 2013-05-23 22:26 UTC (permalink / raw)
  To: u-boot

From: Tom Warren <twarren@nvidia.com>

The non-SPL build of U-Boot on Tegra only runs on a single CPU, and
hence there is no need to enable the SCU when running U-Boot. If an
SMP OS is booted, and it needs the SCU enabled, it will enable the SCU
itself. U-Boot doing so is redundant.

The one exception is Tegra20, where an enabled SCU is required for some
aspects of PCIe to work correctly.

Some Tegra SoCs contain CPUs without a software-controlled SCU. In this
case, attempting to turn it on actively causes problems. This is the case
for Tegra114. For example, when running Linux, the first (or at least
some very early) user-space process will trigger the following kernel
message:

Unhandled fault: imprecise external abort (0x406) at 0x00000000

This is typically accompanied by that process receving a fatal signal,
and exiting. Since this process is usually pid 1, this causes total
system boot failure.

Signed-off-by: Tom Warren <twarren@nvidia.com>
[swarren, fleshed out description, ported to upstream chipid APIs]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/cpu/tegra-common/ap.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/cpu/tegra-common/ap.c b/arch/arm/cpu/tegra-common/ap.c
index e099683..9e6d51d 100644
--- a/arch/arm/cpu/tegra-common/ap.c
+++ b/arch/arm/cpu/tegra-common/ap.c
@@ -109,6 +109,10 @@ static void enable_scu(void)
 	struct scu_ctlr *scu = (struct scu_ctlr *)NV_PA_ARM_PERIPHBASE;
 	u32 reg;
 
+	/* Only enable the SCU on T20/T25 */
+	if (tegra_get_chip() != CHIPID_TEGRA20)
+		return;
+
 	/* If SCU already setup/enabled, return */
 	if (readl(&scu->scu_ctrl) & SCU_CTRL_ENABLE)
 		return;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] ARM: tegra: only enable SCU on Tegra20
  2013-05-23 22:26 [U-Boot] [PATCH] ARM: tegra: only enable SCU on Tegra20 Stephen Warren
@ 2013-06-04 19:33 ` Stephen Warren
  2013-06-04 20:33   ` Tom Warren
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Warren @ 2013-06-04 19:33 UTC (permalink / raw)
  To: u-boot

On 05/23/2013 04:26 PM, Stephen Warren wrote:
> From: Tom Warren <twarren@nvidia.com>
> 
> The non-SPL build of U-Boot on Tegra only runs on a single CPU, and
> hence there is no need to enable the SCU when running U-Boot. If an
> SMP OS is booted, and it needs the SCU enabled, it will enable the SCU
> itself. U-Boot doing so is redundant.
> 
> The one exception is Tegra20, where an enabled SCU is required for some
> aspects of PCIe to work correctly.
> 
> Some Tegra SoCs contain CPUs without a software-controlled SCU. In this
> case, attempting to turn it on actively causes problems. This is the case
> for Tegra114. For example, when running Linux, the first (or at least
> some very early) user-space process will trigger the following kernel
> message:
> 
> Unhandled fault: imprecise external abort (0x406) at 0x00000000
> 
> This is typically accompanied by that process receving a fatal signal,
> and exiting. Since this process is usually pid 1, this causes total
> system boot failure.

Tom, is this patch OK? It's a rather critical bug-fix for Tegra114, so
I'd like to make sure it gets into the upcoming release. Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] ARM: tegra: only enable SCU on Tegra20
  2013-06-04 19:33 ` Stephen Warren
@ 2013-06-04 20:33   ` Tom Warren
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Warren @ 2013-06-04 20:33 UTC (permalink / raw)
  To: u-boot

Sorry, my BW is being used up by internal projects. I'll pull it down, apply/build/test in u-boot-tegra/next, and then I can send a PR to Albert if you think it needs to move higher up right away.

Tom

> -----Original Message-----
> From: Stephen Warren [mailto:swarren at wwwdotorg.org]
> Sent: Tuesday, June 04, 2013 12:34 PM
> To: Tom Warren
> Cc: u-boot at lists.denx.de; Simon Glass; Stephen Warren
> Subject: Re: [U-Boot] [PATCH] ARM: tegra: only enable SCU on Tegra20
> 
> On 05/23/2013 04:26 PM, Stephen Warren wrote:
> > From: Tom Warren <twarren@nvidia.com>
> >
> > The non-SPL build of U-Boot on Tegra only runs on a single CPU, and
> > hence there is no need to enable the SCU when running U-Boot. If an
> > SMP OS is booted, and it needs the SCU enabled, it will enable the SCU
> > itself. U-Boot doing so is redundant.
> >
> > The one exception is Tegra20, where an enabled SCU is required for
> > some aspects of PCIe to work correctly.
> >
> > Some Tegra SoCs contain CPUs without a software-controlled SCU. In
> > this case, attempting to turn it on actively causes problems. This is
> > the case for Tegra114. For example, when running Linux, the first (or
> > at least some very early) user-space process will trigger the
> > following kernel
> > message:
> >
> > Unhandled fault: imprecise external abort (0x406) at 0x00000000
> >
> > This is typically accompanied by that process receving a fatal signal,
> > and exiting. Since this process is usually pid 1, this causes total
> > system boot failure.
> 
> Tom, is this patch OK? It's a rather critical bug-fix for Tegra114, so I'd like to
> make sure it gets into the upcoming release. Thanks.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-04 20:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23 22:26 [U-Boot] [PATCH] ARM: tegra: only enable SCU on Tegra20 Stephen Warren
2013-06-04 19:33 ` Stephen Warren
2013-06-04 20:33   ` Tom Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox