From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Thu, 26 Sep 2013 14:32:03 -0700 Subject: [U-Boot] When to create a SoC directory for ARM In-Reply-To: <1380230768.24959.321.camel@snotra.buserror.net> References: <1380223392.24959.275.camel@snotra.buserror.net> <52448F8F.9080604@freescale.com> <1380225311.24959.295.camel@snotra.buserror.net> <524491C2.4040807@freescale.com> <1380228278.24959.304.camel@snotra.buserror.net> <52449DC2.2020204@ti.com> <1380229185.24959.315.camel@snotra.buserror.net> <5244A11D.9030302@ti.com> <5244A210.7070207@freescale.com> <1380230768.24959.321.camel@snotra.buserror.net> Message-ID: <5244A7D3.1060603@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/26/2013 02:26 PM, Scott Wood wrote: > On Thu, 2013-09-26 at 14:07 -0700, York Sun wrote: >> On 09/26/2013 02:03 PM, Tom Rini wrote: >>> On 09/26/2013 04:59 PM, Scott Wood wrote: >>>> On Thu, 2013-09-26 at 16:49 -0400, Tom Rini wrote: >>>>> On 09/26/2013 04:44 PM, Scott Wood wrote: >>>>>> On Thu, 2013-09-26 at 12:57 -0700, York Sun wrote: >>>>>>> On 09/26/2013 12:55 PM, Scott Wood wrote: >>>>>>>> On Thu, 2013-09-26 at 12:48 -0700, York Sun wrote: >>>>>>>>> On 09/26/2013 12:46 PM, Sharma Bhupesh-B45370 wrote: >>>>>>>>>> >>>>>>>>>>> -----Original Message----- From: >>>>>>>>>>> u-boot-bounces at lists.denx.de >>>>>>>>>>> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of >>>>>>>>>>> Scott Wood Sent: Friday, September 27, 2013 12:53 AM >>>>>>>>>>> To: FengHua Cc: trini; sun york-R58495; u-boot >>>>>>>>>>> Subject: Re: [U-Boot] When to create a SoC directory >>>>>>>>>>> for ARM >>>>>>>>>>> >>>>>>>>>>> On Thu, 2013-09-26 at 13:23 +0800, FengHua wrote: >>>>>>>>>>>> all SOC specific include file should be in >>>>>>>>>>>> arch/arm/include/asm/arch-SOC/ or some common >>>>>>>>>>>> directory(like include/asm/imx-common). Currently, >>>>>>>>>>>> u-boot only link SOC specific(arch-SOC) include >>>>>>>>>>>> directory. You could touch a mmu.h file in >>>>>>>>>>>> arch/arm/include/asm/arch-ls2/ and include >>>>>>>>>>>> arch/arm/include/asm/arch-armv8/mmu.h. or move >>>>>>>>>>>> arch-armv8/mmu.h to arch/arm/include/asm/ to make >>>>>>>>>>>> it as a generic file. Maybe we should distinguish >>>>>>>>>>>> architecture specific include directory and SOC >>>>>>>>>>>> specific include directory. >>>>>>>>>>> >>>>>>>>>>> Is the XXX arch-XXX supposed to be an SoC family or >>>>>>>>>>> a CPU family/architectutre? >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Usually in 'arch/arm/include/asm' we have both: - >>>>>>>>>> arch-armv7 (Arch specific. Houses stuff common to >>>>>>>>>> ARMv7 CPU, e.g. Global timer, SP805 WDT..) - arch-mx6 >>>>>>>>>> (SoC family specific. Houses stuff like SoC specific >>>>>>>>>> IOMUX pads..) >>>>>>>> >>>>>>>> Which one does "#inculde " refer to? >>>>>>>> >>>>>>> >>>>>>> arm/arch is a symbolic link created at compiling time. It >>>>>>> points to arm/arch-$(soc), if $(soc) is not defined, then it >>>>>>> points to asm/arch-$(arch). That's my understanding. >>>>>> >>>>>> How is that supposed to work when both arch-$(soc) and >>>>>> arch-$(arch) are present? Why are SoC and CPU arch confused in >>>>>> this way? >>>>> >>>>> Primarily because it hasn't been an issue until now really. >>>>> What's wrong with just saying as needed >>>>> ? >>> >>>> Hmm, the only relevant are in armv8-specific >>>> files, so I suppose we could do that. Why not just rename it >>>> asm/armv[78], though? There are only a handful of files in both >>>> armv7 and armv8, so it shouldn't be too much of a problem. Then >>>> there's no question of where the symlink points. >>> >>> That should also be fine, after a quick git grep around.. >>> >> How about arch/arm/include/asm/gpio.h? it includes . > > gpio.h doesn't belong in the armv8 directory. > No, it doesn't. But oddly we have a lot of them. And since it is including , we have to make it happy. $ find arch/arm/include/ -name gpio.h arch/arm/include/asm/arch-spear/gpio.h arch/arm/include/asm/arch-am33xx/gpio.h arch/arm/include/asm/arch-omap3/gpio.h arch/arm/include/asm/imx-common/gpio.h arch/arm/include/asm/arch-mx5/gpio.h arch/arm/include/asm/arch-tegra20/gpio.h arch/arm/include/asm/arch-rmobile/gpio.h arch/arm/include/asm/arch-tegra/gpio.h arch/arm/include/asm/gpio.h arch/arm/include/asm/arch-bcm2835/gpio.h arch/arm/include/asm/arch-mxs/gpio.h arch/arm/include/asm/arch-s3c24x0/gpio.h arch/arm/include/asm/arch-davinci/gpio.h arch/arm/include/asm/arch-nomadik/gpio.h arch/arm/include/asm/arch-armada100/gpio.h arch/arm/include/asm/arch-tegra114/gpio.h arch/arm/include/asm/arch-armv8/gpio.h arch/arm/include/asm/arch-mx6/gpio.h arch/arm/include/asm/arch-exynos/gpio.h arch/arm/include/asm/arch-omap4/gpio.h arch/arm/include/asm/arch-mx27/gpio.h arch/arm/include/asm/arch-mx35/gpio.h arch/arm/include/asm/arch-u8500/gpio.h arch/arm/include/asm/arch-mx25/gpio.h arch/arm/include/asm/arch-kirkwood/gpio.h arch/arm/include/asm/arch-omap5/gpio.h arch/arm/include/asm/arch-tegra30/gpio.h arch/arm/include/asm/arch-at91/gpio.h arch/arm/include/asm/arch-s5pc1xx/gpio.h arch/arm/include/asm/arch-mx31/gpio.h York