public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] Refactoring of U-Boot directory structure
Date: Mon, 28 Jul 2014 11:24:04 -0600	[thread overview]
Message-ID: <53D68734.7010306@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ2M8XyUGEMPgy4HZ9KUJoGP+qMhQH5OqaW_Wc_TqZ4e-A@mail.gmail.com>

On 07/27/2014 09:31 PM, Simon Glass wrote:
> Hi Stephen,
>
> On 13 June 2014 08:18, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>> Hi Stephen,
>>
>>
>> On Thu, 12 Jun 2014 09:16:14 -0600
>> Stephen Warren <swarren@wwwdotorg.org> wrote:
>>
>>> On 06/11/2014 10:10 PM, Masahiro Yamada wrote:
>>> ...
>>>> Tegra uses different CPU  for SPL and Normal U-boot.
>>>> That's why Tegra directories are sprinkled under arch/arm/:
>>>>
>>>> arch/arm/cpu/arm720t/tegra-common/
>>>> arch/arm/cpu/arm720t/tegra20/
>>>> arch/arm/cpu/arm720t/tegra30/
>>>> arch/arm/cpu/arm720t/tegra114/
>>>> arch/arm/cpu/arm720t/tegra124/
>>>> arch/arm/cpu/armv7/tegra-common/
>>>> arch/arm/cpu/armv7/tegra20/
>>>> arch/arm/cpu/armv7/tegra30/
>>>> arch/arm/cpu/armv7/tegra114/
>>>> arch/arm/cpu/armv7/tegra124/
>>>> arch/arm/include/asm/arch-tegra/
>>>> arch/asm/include/asm/arch-tegra20/
>>>> arch/asm/include/asm/arch-tegra30/
>>>> arch/asm/include/asm/arch-tegra114/
>>>> arch/asm/include/asm/arch-tegra124/
>>>
>>> This is a deliberate split so that we can control the code/data size of
>>> the arm720t (SPL) parts of the code.
>>>
>>>> They can be refactored
>>>>
>>>> arch/arm/mach-tegra/                      : tegra common part
>>>> arch/arm/mach-tegra/tegra20/         : tegra20-specific
>>>> arch/arm/mach-tegra/tegra30/         : tegra30-specific
>>>> arch/arm/mach-tegra/tegra114/       : tegra114-specific
>>>> arch/arm/mach-tegra/tegra124/       : tegra124-specific
>>>>
>>>> or  maybe
>>>>
>>>> arch/arm/plat-tegra/               : tegra common part
>>>> arch/arm/mach-tegra20/         : tegra20-specific
>>>> arch/arm/mach-tegra30/         : tegra30-specific
>>>> arch/arm/mach-tegra114/       : tegra114-specific
>>>> arch/arm/mach-tegra124/       : tegra124-specific
>>>
>>> If we refactor into that structure, the SPL/non-SPL separation will be
>>> much less clear.
>>
>> In that case, you can create a subdirectory under mach-tegra/
>> to separate SPL code from the others.
>
> Does Masahiro's proposed approach work for you? The second one seems
> good to me - I quite like the plat-tegra idea for completely common
> code, and the flatter directory structure.
>
> Also if Tegra starts supporting an ARMv7/8 CPU for start-up, then a
> spl/ subdirectory would be needed anyway, to separate out the code.

I guess I'd be fine with something like:

arch/arm/mach-tegra/*.c
arch/arm/mach-tegra/spl/*.c

and if needed an SoC-specific directory under each:

arch/arm/mach-tegra/*.c
arch/arm/mach-tegra/tegra20/*.c
arch/arm/mach-tegra/tegra30/*.c
...
arch/arm/mach-tegra/spl/*.c
arch/arm/mach-tegra/spl/tegra20/*.c
arch/arm/mach-tegra/spl/tegra30/*.c
...

I don't think a completely flat directory structure would work, since 
there are probably some alternative implementations of files/functions 
for different SoCs and/or SPL-vs-non-SPL.

  reply	other threads:[~2014-07-28 17:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12  4:10 [U-Boot] Refactoring of U-Boot directory structure Masahiro Yamada
2014-06-12  4:41 ` Wolfgang Denk
2014-06-12  6:32   ` Masahiro Yamada
2014-06-12  7:46     ` Andreas Bießmann
2014-06-12 15:16 ` Stephen Warren
2014-06-13  7:18   ` Masahiro Yamada
2014-07-28  3:31     ` Simon Glass
2014-07-28 17:24       ` Stephen Warren [this message]
2014-07-28  3:26 ` 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=53D68734.7010306@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