All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/7] Tegra114: Add AVP (arm720t) files
Date: Thu, 17 Jan 2013 15:42:30 -0700	[thread overview]
Message-ID: <50F87E56.1000705@wwwdotorg.org> (raw)
In-Reply-To: <CA+m5__L_YyiCu11LiFrOXxhCnM0GnukvL3c7ida5MKCSJT201w@mail.gmail.com>

On 01/17/2013 12:15 PM, Tom Warren wrote:
> Stephen,
> 
> On Wed, Jan 16, 2013 at 3:42 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 01/16/2013 02:14 PM, Tom Warren wrote:
>>> This provides SPL support for T114 boards - AVP early init, plus
>>> CPU (A15) init/jump to main U-Boot.

>>> diff --git a/arch/arm/cpu/arm720t/tegra-common/cpu.h b/arch/arm/cpu/arm720t/tegra-common/cpu.h
>>
>>> +#ifndef TRUE
>>> +#define TRUE 1
>>> +#endif
>>> +#ifndef FALSE
>>> +#define FALSE        0
>>> +#endif
>>
>> Surely those are in a standard header somewhere; we shouldn't create yet
>> another duplicate of them.
> 
> Couldn't find 'em on a quick search (grep define.TRUE) except in
> places like scsi.h and ext4_common.h and fpga.h. If you have a
> standard header that you know of, let me know.

Hmmm. Further investigation shows it is indeed once of those standard
things that isn't actually defined anywhere standard:-(

>>> diff --git a/arch/arm/cpu/arm720t/tegra114/cpu.c b/arch/arm/cpu/arm720t/tegra114/cpu.c
>>
>>> +static int is_partition_powered(u32 mask)
>>
>>> +     reg = readl(&pmc->pmc_pwrgate_status);
>>> +     if ((reg & mask) == mask)
>>> +             return TRUE;
>>> +
>>> +     return FALSE;
>>
>> The last 4 lines are just "return reg & mask;" or "return (reg & mask)
>> == mask;". Same in the next function.
> 
> I'm porting internal bootloader bringup code here, and trying to avoid
> unnecessary changes, but I can modify these to remove the TRUE/FALSE
> in V2.

I don't think our downstream code is relevant for upstreaming; changes
sent upstream should be clean/minimal/standalone. In fact, I find
upstreaming a good time to explicitly remove/clean-up all the cruft that
has accumulated downstream, which wasn't always thought through thoroughly.

>>> +void powerup_cpus(void)
>>> +{
>>> +     debug("powerup_cpus entry\n");
>>> +
>>> +     /* Are we booting to the fast cluster? */
>>> +     if (get_cluster_id() == 0) {
>>
>> Why would we ever boot on anything other than the fast cluster? I would
>> assume that the kernel assume it will always get booted on the fast
>> cluster, which would then imply that U-Boot had to boot on or switch to
>> the fast cluster.
> 
> Again, this is from internal NV bootloader code that I know works. I
> don't know the circumstances where we might be booted on the LP
> cluster, but I figured if the internal bootloader code thought it
> worth checking, so should I.  If you have unimpeachable evidence to
> the contrary, I can optimize this out.

I think it's more that if we don't have concrete evidence that the code
is needed, we shouldn't bloat usptream with cruft.

  reply	other threads:[~2013-01-17 22:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 21:14 [U-Boot] [PATCH 0/7] Add support for NVIDIA Tegra114 SoC Tom Warren
2013-01-16 21:14 ` [U-Boot] [PATCH 1/7] Tegra114: Add arch-tegra114 include files Tom Warren
2013-01-16 22:32   ` Stephen Warren
2013-01-17 17:51     ` Tom Warren
2013-01-17 22:23       ` Stephen Warren
2013-01-17 22:56         ` Tom Warren
2013-01-16 22:39   ` Allen Martin
2013-01-17 17:50     ` Tom Warren
2013-01-16 21:14 ` [U-Boot] [PATCH 2/7] Tegra114: Add AVP (arm720t) files Tom Warren
2013-01-16 22:42   ` Stephen Warren
2013-01-17 19:15     ` Tom Warren
2013-01-17 22:42       ` Stephen Warren [this message]
2013-01-16 23:01   ` Allen Martin
2013-01-17 19:28     ` Tom Warren
2013-01-16 21:14 ` [U-Boot] [PATCH 3/7] Tegra114: Add CPU (armv7) files Tom Warren
2013-01-16 21:14 ` [U-Boot] [PATCH 4/7] Tegra114: Add common CPU (shared) files Tom Warren
2013-01-16 22:46   ` Stephen Warren
2013-01-17 17:55     ` Tom Warren
2013-01-16 21:14 ` [U-Boot] [PATCH 5/7] Tegra114: Dalmore: Add DT files Tom Warren
2013-01-16 22:47   ` Stephen Warren
2013-01-17 17:58     ` Tom Warren
2013-01-17 22:25       ` Stephen Warren
2013-01-17 22:58         ` Tom Warren
2013-01-17 23:11           ` Stephen Warren
2013-01-17 23:29             ` Tom Warren
2013-01-16 21:14 ` [U-Boot] [PATCH 6/7] Tegra114: Add generic Tegra114 build support Tom Warren
2013-01-16 21:14 ` [U-Boot] [PATCH 7/7] Tegra114: Add/enable Dalmore build (T114 reference board) Tom Warren
2013-01-16 22:51   ` Stephen Warren
2013-01-17 18:01     ` Tom Warren
2013-01-21 23:07     ` Simon Glass
2013-01-22 20:47       ` Tom Warren
2013-01-22 20:56         ` Simon Glass

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=50F87E56.1000705@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 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.