From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] When to create a SoC directory for ARM
Date: Thu, 26 Sep 2013 12:18:38 -0700 [thread overview]
Message-ID: <5244888E.2090201@freescale.com> (raw)
In-Reply-To: <1a798b7.2bafa.14159e387e2.Coremail.fenghua@phytium.com.cn>
On 09/26/2013 03:49 AM, FengHua wrote:
>
>
>
>> -----????-----
>> ???: "sun york-R58495" <R58495@freescale.com>
>> ????: 2013?9?26? ???
>> ???: FengHua <fenghua@phytium.com.cn>
>> ??: "albert.u.boot" <albert.u.boot@aribaud.net>, trini <trini@ti.com>, "Wood
>> Scott-B07421" <B07421@freescale.com>, u-boot <u-boot@lists.denx.de>
>> ??: Re: [U-Boot] When to create a SoC directory for ARM
>>
>>
>> On Sep 25, 2013, at 10:23 PM, FengHua wrote:
>>
>>>> Date: Wed, 25 Sep 2013 20:10:13 -0500
>>>> From: Scott Wood <scottwood@freescale.com>
>>>> Subject: Re: [U-Boot] When to create a SoC directory for ARM
>>>> To: sun york-R58495 <R58495@freescale.com>
>>>> Cc: Rini <trini@ti.com>, Wood Scott-B07421 <B07421@freescale.com>,
>>>> "u-boot at lists.denx.de" <u-boot@lists.denx.de>, Tom
>>>> Message-ID: <1380157813.24959.237.camel@snotra.buserror.net>
>>>> Content-Type: text/plain; charset="UTF-8"
>>>
>>>> On Wed, 2013-09-25 at 20:04 -0500, sun york-R58495 wrote:
>>>>> On Sep 25, 2013, at 4:52 PM, Scott Wood wrote:
>>>>>
>>>>>> On Wed, 2013-09-25 at 16:30 -0700, York Sun wrote:
>>>>>>> Dear Wolfgang,
>>>>>>>
>>>>>>> I failed to find the guideline, here is my question. Pardon me if this
>>>>>>> is a dump question as I am still new to ARM.
>>>>>>>
>>>>>>> As David Feng post his patch set to add ARMv8 support, I am trying to
>>>>>>> enable it for Freescale implementation. Let's name it as LS2 for this
>>>>>>> discussion. I am thinking to reuse as much as possible for existing
>>>>>>> codes, which include copying some header files from powerpc partially. I
>>>>>>> noticed the SoC field in boards.cfg file and I am wondering how to use
>>>>>>> it effectively. I want to put LS2 specific headers to
>>>>>>> arch/arm/include/asm/arch-ls2. Do I need to copy all files from
>>>>>>> arch/arm/include/asm/arch-armv8/? There aren't many but I see mmu.h is
>>>>>>> included in start.S. I have been searching case like this in ARMv7 but
>>>>>>> didn't see shared header file (maybe I missed it). Please advise.
>>>>>>
>>>>>> LS2 is (or perhaps more accurately, contains) an implementation of
>>>>>> ARMv8, so you should be using arch-armv8 rather than copying it.
>>>>>
>>>>> True. But I guess LS2 won't be the only "LS" Freescale is going to
>>>>> make. Where is the best place to put the header file for chassis
>>>>> related registers, like CCSR we have for mpc8xxx.
>>>
>>>> Anything that isn't deeply tied to the ARM architecture should probably
>>>> just go in include/.
>>>>> I am thinking the
>>>>> best place is arch/arm/include/asm/ls2 (or a better name). Like other
>>>>> ARMv7 variants, I am thinking to put ls2 under arch/arm/cpu/armv8/ as
>>>>> well, to host LS-specific code.
>>>
>>>> Likewise, if it's specifically tied to armv8 it should go in
>>>> arch/arm/include/asm/arch-armv8, but I'm not sure what would be tied to
>>>> both armv8 and ls2. Most likely anything LS-specific that needs to go
>>>> under arch/arm/ should go somewhere like arch/arm/include/asm/ls/
>>>> (similar to arch/arm/include/asm/imx-common).
>>>
>>>> -Scott
>>>
>>> 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.
>>
>>
>> I was thinking to change the include in start.S to
>>
>> #include <asm/arch-armv8/mmu.h>
>>
>
> The current arch-armv8/mum.h is based on armv8 architecture.
> Maybe just maybe some armv8 processor will not implement some features of it
> for example 64K page size, then it do not works.
> So, maybe it's better to touch a mmu.h file in include/asm/arch_SOC and
> include arch-armv8/mmu.h or make different implementation.
How does the arch-xxx work in general? I found no example to use header
files from both asm/arch-xxx and asm/arch directories.
York
next prev parent reply other threads:[~2013-09-26 19:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 5:23 [U-Boot] When to create a SoC directory for ARM FengHua
2013-09-26 5:31 ` sun york-R58495
2013-09-26 10:49 ` FengHua
2013-09-26 15:22 ` York Sun
2013-09-26 19:18 ` York Sun [this message]
2013-09-26 19:23 ` Scott Wood
2013-09-26 19:46 ` Sharma Bhupesh-B45370
2013-09-26 19:48 ` York Sun
2013-09-26 19:55 ` Scott Wood
2013-09-26 19:57 ` York Sun
2013-09-26 20:44 ` Scott Wood
2013-09-26 20:46 ` York Sun
2013-09-26 20:48 ` Scott Wood
2013-09-26 20:49 ` Tom Rini
2013-09-26 20:59 ` Scott Wood
2013-09-26 21:03 ` Tom Rini
2013-09-26 21:07 ` York Sun
2013-09-26 21:26 ` Scott Wood
2013-09-26 21:32 ` York Sun
2013-09-26 21:39 ` Tom Rini
2013-09-26 19:55 ` Sharma Bhupesh-B45370
-- strict thread matches above, loose matches on Subject: below --
2013-09-17 15:59 [U-Boot] How do ARM platform initialize DDR? York Sun
2013-09-19 20:57 ` Tom Rini
2013-09-19 21:08 ` York Sun
2013-09-19 21:39 ` Wolfgang Denk
2013-09-25 23:30 ` [U-Boot] When to create a SoC directory for ARM York Sun
2013-09-25 23:52 ` Scott Wood
2013-09-26 1:04 ` sun york-R58495
2013-09-26 1:10 ` Scott Wood
2013-09-26 9:58 ` Wolfgang Denk
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=5244888E.2090201@freescale.com \
--to=yorksun@freescale.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