All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Refactoring of U-Boot directory structure
@ 2014-06-12  4:10 Masahiro Yamada
  2014-06-12  4:41 ` Wolfgang Denk
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Masahiro Yamada @ 2014-06-12  4:10 UTC (permalink / raw)
  To: u-boot

Hi.

In U-Boot, the directory structure under arch/ is like this
arch/${ARCH}/cpu/${CPU}/${SOC}

  Exception:
    - ${CPU} is missing for some architectures such as blackfin, sandbox, etc.
    - There are many boards without ${SOC}


My question is, ${SOC} should always depend on ${CPU} ?

I think it is reasonable to migrate to the structure like this:

     arch/${ARCH}/cpu/${CPU}
                          /mach-${foo}
                          /mach-${bar}

I think  arch/${ARCH}/cpu/${CPU}/${SOC}  structure
have given us a lot of pain.


The problems I want to solve are:


[1] Do not split the similar  SoC family to various directories

at91 SoC directory exists under arm920t, arm926ejs, armv7 directory.

./arch/arm/cpu/arm920t/at91
./arch/arm/cpu/arm926ejs/at91
./arch/arm/cpu/armv7/at91

It looks reasonable to collect at91 sources into a single place,
arch/arm/mach-at91


[2] Collect C/ASM sources and headers into a single place

Now SoC-specific sources are under
./arch/${ARCH}/cpu/${CPU}/${SOC}/

But headers are
./arch/${ARCH}/include/asm/arch-${SOC}/

In the new structure,
./arch/arm/mach-${SOC}/                      : C/ASM files
./arch/arm/mach-${SOC}/include/          : Header files


[3] Do not create a symbolic link to header dicrectory

mkconfig creates a symbolic link to
arch/asm/include/asm/arch-${SOC}

I dislike creating a symbolic link by configuration 
and remove it by mrproper.

Linux Kernel did that long time ago, but they did away with it.


[4] Stop Tegra

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/


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



Your comments are welcome!


Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2014-07-28 17:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2014-07-28  3:26 ` Simon Glass

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.