From: Antony Pavlov <antonynpavlov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC PATCH 4/6] arm: cpuinfo: Cortex-A9 dirty hack
Date: Thu, 6 Oct 2011 22:32:26 +0400 [thread overview]
Message-ID: <CAA4bVAFeJq-CkJ8tMOXvMfH8NwgsGPV_QCtLfuRU-WRAsZdfRQ@mail.gmail.com> (raw)
In-Reply-To: <20111006110410.GU31404@pengutronix.de>
On 6 October 2011 15:04, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Thu, Sep 29, 2011 at 06:04:34PM +0400, Antony Pavlov wrote:
>> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
>> ---
>> arch/arm/cpu/cpuinfo.c | 10 +++++++++-
>> 1 files changed, 9 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/cpu/cpuinfo.c b/arch/arm/cpu/cpuinfo.c
>> index e19b8de..25d2c3f 100644
>> --- a/arch/arm/cpu/cpuinfo.c
>> +++ b/arch/arm/cpu/cpuinfo.c
>> @@ -101,7 +101,15 @@ static int do_cpuinfo(struct command *cmdtp, int argc, char *argv[])
>> if (arch > 0 && arch < 8)
>> architecture = post_arm7_archs[arch - 1];
>> else
>> - architecture = "Unknown";
>> + /*
>> + * see Cortex-A9 Technical Reference Manual:
>> + * Main ID Register value fixed to 0x411fc090
>> + */
>> + if (mainid == 0x411fc090) {
>> + architecture = "Cortex-A9";
>> + } else {
>> + architecture = "Unknown";
>> + }
>
> For Cortex-A8 it seems to be 0x412fc085. Aybe you can have a look at
> arch/arm/kernel/setup.c in the kernel to see how it's done there. Would
> be good to catch the Cortex-A8 aswell with this patch.
>
Sorry, but now I think that my patch is completely wrong.
The "Cortex A9" in __CPU core name__, not an __architecture name__.
Really, "Cortex A9" has the "ARM v7" architecture.
I will fix my patch using linux/arch/arm/kernel/setup.c as a model.
To show cpu name we will need something like struct proc_info_list in linux:
struct cpu_ids {
u32 cpu_id;
u32 cpu_id_mask;
const char *cpu_name;
} cpu_ids[] = {
{ 0x410fc050, 0xff0ffff0, "Cortex A5", },
{ 0x410fc090, 0xff0ffff0, "Cortex A9", },
{ 0x410fc0f0, 0xff0ffff0, "Cortex A15", },
...
}
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-10-06 18:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 14:04 [RFC PATCH 0/6] ARM: initial Tegra support Antony Pavlov
2011-09-29 14:04 ` [RFC PATCH 1/6] " Antony Pavlov
2011-09-29 14:04 ` [RFC PATCH 2/6] dirty hack, fixme: disable mmu_cache_flush in arch/arm/cpu/start.c for Tegra Antony Pavlov
2011-10-06 11:07 ` Sascha Hauer
2011-09-29 14:04 ` [RFC PATCH 3/6] ARM: Tegra: add Toshiba AC100 support Antony Pavlov
2011-09-29 14:04 ` [RFC PATCH 4/6] arm: cpuinfo: Cortex-A9 dirty hack Antony Pavlov
2011-10-06 11:04 ` Sascha Hauer
2011-10-06 18:32 ` Antony Pavlov [this message]
2011-09-29 14:04 ` [RFC PATCH 5/6] toshiba-ac100: add USB host support Antony Pavlov
2011-10-06 11:05 ` Sascha Hauer
2011-09-29 14:04 ` [RFC PATCH 6/6] toshiba-ac100_defconfig update: enable USB-related stuff Antony Pavlov
2011-10-06 11:06 ` Sascha Hauer
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=CAA4bVAFeJq-CkJ8tMOXvMfH8NwgsGPV_QCtLfuRU-WRAsZdfRQ@mail.gmail.com \
--to=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.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