From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Kirkwood: print_cpuinfo fixed for valid devid revid
Date: Thu, 16 Sep 2010 13:05:52 +0200 [thread overview]
Message-ID: <4C91FA10.6080105@free.fr> (raw)
In-Reply-To: <1284648724-6871-1-git-send-email-prafulla@marvell.com>
Hi Prafulla,
Le 16/09/2010 16:52, Prafulla Wadaskar a ?crit :
> diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
> index 82c978b..5feb0b5 100644
> --- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
> +++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
> @@ -271,20 +272,32 @@ static void kw_sysrst_check(void)
> #if defined(CONFIG_DISPLAY_CPUINFO)
> int print_cpuinfo(void)
> {
> - char *name = "Unknown";
> + char *rev, name[6];
> + u16 devid = (readl(KW_REG_PCIE_DEVID)>> 16)& 0xffff;
> + u8 revid = readl(KW_REG_PCIE_REVID)& 0xff;
>
> - switch (readl(KW_REG_DEVICE_ID)& 0x03) {
> - case 1:
> - name = "88F6192_A0";
> + if ((readl(KW_REG_DEVICE_ID)& 0x03)> 2) {
> + debug("Error.. %s:Unsupported Kirkwood SoC\n", __FUNCTION__);
Maybe you could add the actual content of the device ID register so that
the operator can read it on the console?
> + return -1;
> + }
> +
> + switch (revid) {
> + case 0:
> + rev = "Z0";
> break;
> case 2:
> - name = "88F6281_A0";
> + rev = "A0";
> + break;
> + case 3:
> + rev = "A1";
> break;
> default:
> - printf("SoC: Unsupported Kirkwood\n");
> - return -1;
> + rev = "??";
Same here with this "??": replacing it with the actual revision ID
register value would allow the operator to read it directly on the console.
Amicalement,
--
Albert.
next prev parent reply other threads:[~2010-09-16 11:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 14:52 [U-Boot] [PATCH] Kirkwood: print_cpuinfo fixed for valid devid revid Prafulla Wadaskar
2010-09-16 11:05 ` Albert ARIBAUD [this message]
2010-09-16 11:31 ` 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=4C91FA10.6080105@free.fr \
--to=albert.aribaud@free.fr \
--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