public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <tom.rini@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 02/19] ARM: prepare for moving SoC sources into mach-*
Date: Sat, 21 Feb 2015 21:57:44 -0500	[thread overview]
Message-ID: <20150222025744.GK25879@bill-the-cat> (raw)
In-Reply-To: <1424419459-3498-3-git-send-email-yamada.m@jp.panasonic.com>

On Fri, Feb 20, 2015 at 05:04:02PM +0900, Masahiro Yamada wrote:

> In U-boot, the directory structure, arch/$(ARCH)/cpu/$(CPU)/$(SOC)/
> has been adopted except that $(CPU) is missing from some
> architectures and $(SOC) is missing from some CPUs.
> 
> This structure did not fit very well in some cases.
> 
> [1] AT91
> 
> AT91 SoC family have been developed across some ARM processor
> generations.  Generally speaking, some IPs are often re-used in the
> same SoC family (same SoC vendor) even when the main processor is
> updated.  As a result, a SoC-common directory is needed in the upper
> level.  Currently, AT91 source files are placed as follows:
> 
>   arch/arm/cpu/arm920t/at91/*
>   arch/arm/cpu/arm926ejs/at91/*
>   arch/arm/cpu/armv7/at91/*
>   arch/arm/cpu/at91-common/*
> 
> Once directories are split, the motivation for refactorings across
> CPU directories is lost.  Some files in arm920t/at91/ and
> arm926ejs/at91/ are so similar that they could be merged.
> 
> [2] Tegra
> 
> Tegra is a little bit special case where different CPUs are used for
> SPL and the main U-boot.  To obey the arch/$(ARCH)/cpu/$(CPU)/$(SOC)
> structure, the source files must be placed across the CPUs,
> again SoC-common directory is necessary in the upper level.
> 
> Moreover, there are several families in Tegra: Tegra20, Tegra30,
> Tegra114, Tegra124.  Here again, the tegra-common directory is needed
> to contain commonly-used files.
> 
> Tegra directories have been sprinkled in the directory structure.
> 
>   arch/arm/cpu/arm720t/tegra20
>   arch/arm/cpu/arm720t/tegra30
>   arch/arm/cpu/arm720t/tegra114
>   arch/arm/cpu/arm720t/tegra124
>   arch/arm/cpu/arm720t/tegra-common
>   arch/arm/cpu/armv7/tegra20
>   arch/arm/cpu/armv7/tegra30
>   arch/arm/cpu/armv7/tegra114
>   arch/arm/cpu/armv7/tegra124
>   arch/arm/cpu/armv7/tegra-common
>   arch/arm/cpu/tegra20-common
>   arch/arm/cpu/tegra30-common
>   arch/arm/cpu/tegra114-common
>   arch/arm/cpu/tegra124-common
>   arch/arm/cpu/tegra-common
> 
> As you see, splitting SoC code by the CPU is not going well,
> especially for ARM.
> Why don't we collect SoC-specific files into a single place?
> 
> A good example we can follow is Linux's arch/arm/mach-* structure.
> 
> This item was discussed in the following thread:
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/188548/
> 
> Looks like I got some positive responses and we are almost ready to
> start this movement.
> 
> This commit prepares arch/arm/Makefile for describing machdirs in it.
> 
> After this commit, we can move SoC directory to arch/arm/mach-$(SOC)
> in simple steps although some cases such as AT91 and Tegra need more
> fixes.
> 
> What we generally have to do is:
> 
> [1] Move files arch/arm/cpu/$(CPU)/$(SOC)/* to arch/arm/mach-$(SOC)/*
> [2] Add machine entry into arch/arm/Makefile
> [3] Remove "obj-y += $(SOC)" from arch/arm/cpu/$(CPU)/Makefile
> [4] Fix the Kconfig file path in arch/arm/Kconfig
> [5] Modify MAINTAINERS if necessary
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Applied to u-boot/master, thanks!

-- 
Tom

  reply	other threads:[~2015-02-22  2:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20  8:04 [U-Boot] [PATCH v3 0/19] ARM: start to move SoC code into arch/arm/mach-* Masahiro Yamada
2015-02-20  8:04 ` [U-Boot] [PATCH v3 01/19] ARM: at91: move board select menu and common settings Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 02/19] ARM: prepare for moving SoC sources into mach-* Masahiro Yamada
2015-02-22  2:57   ` Tom Rini [this message]
2015-02-20  8:04 ` [U-Boot] [PATCH v3 03/19] ARM: at91: collect SoC sources into mach-at91 Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 04/19] ARM: tegra: collect SoC sources into mach-tegra Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 05/19] ARM: davinci: move SoC sources to mach-davinci Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 06/19] ARM: kirkwood: move SOC sources to mach-kirkwood Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 07/19] ARM: nomadik: move SoC sources to mach-nomadik Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 08/19] ARM: highbank: move SoC sources to mach-highbank Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 09/19] ARM: orion5x: move SoC sources to mach-orion5x Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 10/19] ARM: versatile: move SoC sources to mach-versatile Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 11/19] ARM: keystone: move SoC sources to mach-keystone Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 12/19] kbuild: prepare for moving headers into mach-*/include/mach Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 13/19] ARM: at91: move SoC headers to mach-at91/include/mach Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 14/19] ARM: davinci: move SoC headers to mach-davinci/include/mach Masahiro Yamada
2015-02-22  2:56   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 15/19] ARM: kirkwood: move SoC headers to mach-kirkwood/include/mach Masahiro Yamada
2015-02-22  2:57   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 16/19] ARM: nomadik: move SoC headers to mach-nomadik/include/mach Masahiro Yamada
2015-02-22  2:57   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 17/19] ARM: orion5x: move SoC headers to mach-orion5x/include/mach Masahiro Yamada
2015-02-22  2:57   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 18/19] ARM: keystone: move SoC headers to mach-keystone/include/mach Masahiro Yamada
2015-02-22  2:57   ` Tom Rini
2015-02-20  8:04 ` [U-Boot] [PATCH v3 19/19] ARM: prepare for including <mach/*.h> Masahiro Yamada
2015-02-22  2:57   ` Tom Rini

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=20150222025744.GK25879@bill-the-cat \
    --to=tom.rini@gmail.com \
    --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