From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: tegra: Disable VPR
Date: Thu, 19 Jun 2014 10:08:59 -0600 [thread overview]
Message-ID: <53A30B1B.1060900@wwwdotorg.org> (raw)
In-Reply-To: <1403161120-28645-1-git-send-email-acourbot@nvidia.com>
On 06/19/2014 12:58 AM, Alexandre Courbot wrote:
> From: Bryan Wu <pengw@nvidia.com>
>
> On Tegra114 and Tegra124 platforms, certain display-related registers cannot
> be accessed unless the VPR registers are programmed. For bootloader, we
> probably don't care about VPR, so we disable it (which counts as programming
> it, and allows those display-related registers to be accessed.
> diff --git a/arch/arm/cpu/tegra-common/vpr.c b/arch/arm/cpu/tegra-common/vpr.c
> +void config_vpr(void)
> + /* Turn off VPR */
> + writel(0x00000000, &mc->mc_video_protect_size_mb);
> + writel(0x00000001, &mc->mc_video_protect_reg_ctrl);
Can we use a #define rather than "1" there, so we know what the bit
means. Also "0" is as good as "0x00000000" and same for "1".
> diff --git a/arch/arm/include/asm/arch-tegra/mc.h b/arch/arm/include/asm/arch-tegra/mc.h
> +/**
> + * Defines the memory controller registers we need/care about
> + */
> +struct mc_ctlr {
> + u32 reserved0[4]; /* offset 0x00 - 0x0C */
> + u32 mc_smmu_config; /* offset 0x10 */
...
Is this entire layout valid for Tegra20/30 too, and identical for
Tegra114/124? If not, I'd prefer that we:
- Define the structure in arch/arm/include/asm/arch-tegraNNN/mc.h, so
it's obvious that it's not identical on all SoCs (or if the differences
are small, then ifdef the fields in the struct without moving the file
to avoid duplicating the identical parts).
- ifdef out the body of config_vpr() except on SoCs where struct mc_ctrl
is defined.
(actually, ifdefing the body might be useful anyway to remove the code
from builds for older SoCs)
next prev parent reply other threads:[~2014-06-19 16:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 6:58 [U-Boot] [PATCH] ARM: tegra: Disable VPR Alexandre Courbot
2014-06-19 16:08 ` Stephen Warren [this message]
2014-06-23 7:20 ` [U-Boot] [PATCH v2] " Alexandre Courbot
2014-06-23 18:44 ` Stephen Warren
2014-06-24 2:46 ` Alexandre Courbot
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=53A30B1B.1060900@wwwdotorg.org \
--to=swarren@wwwdotorg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox