From: Sanjeev Premi <premi@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] OMAP3, AM35x: Update function print_cpuinfo()
Date: Wed, 16 Dec 2009 00:07:45 +0530 [thread overview]
Message-ID: <1260902266-26009-4-git-send-email-premi@ti.com> (raw)
In-Reply-To: <1260902266-26009-1-git-send-email-premi@ti.com>
The function is updated to make use of the cpu related
information extracted in arch_cpu_init().
Signed-off-by: Sanjeev Premi <premi@ti.com>
---
cpu/arm_cortexa8/omap3/sys_info.c | 45 ++++++++++++++++++++++++------------
1 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c
index 3544d26..1228f5f 100644
--- a/cpu/arm_cortexa8/omap3/sys_info.c
+++ b/cpu/arm_cortexa8/omap3/sys_info.c
@@ -364,45 +364,60 @@ u32 get_device_type(void)
*/
int print_cpuinfo (void)
{
- char *cpu_s, *sec_s;
+ char cpu_s[16], sec_s[4];
- switch (get_cpu_type()) {
+ switch (cpu_id) {
case OMAP3503:
- cpu_s = "3503";
+ strcpy(cpu_s, "OMAP3503");
break;
case OMAP3515:
- cpu_s = "3515";
+ strcpy(cpu_s, "OMAP3515");
break;
case OMAP3525:
- cpu_s = "3525";
+ strcpy(cpu_s, "OMAP3503");
break;
+ case OMAP3430:
case OMAP3530:
- cpu_s = "3530";
+ strcpy(cpu_s, "OMAP3430/3530");
break;
- default:
- cpu_s = "35XX";
+ case CTRL_AM3505:
+ strcpy(cpu_s, "AM3505");
+ break;
+ case CTRL_AM3517:
+ strcpy(cpu_s, "AM3517");
break;
+
+ default:
+ if (cpu_family == CPU_AM35XX)
+ strcpy(cpu_s, "AM35xx");
+ else
+ strcpy(cpu_s, "OMAP34xx/35xx");
}
switch (get_device_type()) {
case TST_DEVICE:
- sec_s = "TST";
+ strcpy(sec_s, "TST");
break;
case EMU_DEVICE:
- sec_s = "EMU";
+ strcpy(sec_s, "EMU");
break;
case HS_DEVICE:
- sec_s = "HS";
+ strcpy(sec_s, "HS");
break;
case GP_DEVICE:
- sec_s = "GP";
+ strcpy(sec_s, "GP");
break;
default:
- sec_s = "?";
+ strcpy(sec_s, "?");
}
- printf("OMAP%s-%s ES%s, CPU-OPP2 L3-165MHz\n",
- cpu_s, sec_s, rev_s[get_cpu_rev()]);
+ /*
+ * TBD: Revision numbers for AM35x may not be same as OMAP35x.
+ * Will need to re-look sometime later.
+ */
+ printf("%s-%s ES%s,%s L3-165MHz\n",
+ cpu_s, sec_s, rev_s[get_cpu_rev()],
+ (cpu_family == CPU_AM35XX) ? "" : " CPU-OPP2");
return 0;
}
--
1.6.2.2
next prev parent reply other threads:[~2009-12-15 18:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 18:37 [U-Boot] [PATCH 0/4] AM35x: Initial support for the processor Sanjeev Premi
2009-12-15 18:37 ` [U-Boot] [PATCH 1/4] AM35x: Introduce support for AM35x processors Sanjeev Premi
2009-12-15 18:37 ` [U-Boot] [PATCH 2/4] OMAP3, AM35x: Detect exact CPU in arch_cpu_init() Sanjeev Premi
2009-12-16 22:11 ` Wolfgang Denk
2009-12-15 18:37 ` Sanjeev Premi [this message]
2009-12-16 22:13 ` [U-Boot] [PATCH 3/4] OMAP3, AM35x: Update function print_cpuinfo() Wolfgang Denk
2009-12-15 18:37 ` [U-Boot] [PATCH 4/4] OMAP3, AM35x: Update the checks for CPU revision Sanjeev Premi
2009-12-15 20:01 ` [U-Boot] [PATCH 0/4] AM35x: Initial support for the processor Tom
2009-12-16 8:45 ` Hiremath, Vaibhav
2010-01-07 14:56 ` Premi, Sanjeev
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=1260902266-26009-4-git-send-email-premi@ti.com \
--to=premi@ti.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