summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/imx-common
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-03-20 04:21:45 +0000
committerStefano Babic <sbabic@denx.de>2012-03-27 09:41:16 +0200
commita7683867463481bfea84af4d60af832ddfb3da7f (patch)
tree149d710f8b97b959edec9f8d7ecedac4389b3992 /arch/arm/cpu/armv7/imx-common
parent494931a67465a95b66da346ec7bd002fdf40adee (diff)
downloadu-boot-imx-a7683867463481bfea84af4d60af832ddfb3da7f.zip
u-boot-imx-a7683867463481bfea84af4d60af832ddfb3da7f.tar.gz
u-boot-imx-a7683867463481bfea84af4d60af832ddfb3da7f.tar.bz2
mx6: Read silicon revision from register
Instead of hardcoding the mx6 silicon revision, read it in run-time. Also, besides the silicon version print the mx6 variant type: quad,dual/solo or solo-lite. Tested on a mx6qsabrelite, where it shows: CPU: Freescale i.MX6Q rev1.0 at 792 MHz Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de> Acked-by: Jason Liu <r64343@freescale.com>
Diffstat (limited to 'arch/arm/cpu/armv7/imx-common')
-rw-r--r--arch/arm/cpu/armv7/imx-common/cpu.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/imx-common/cpu.c b/arch/arm/cpu/armv7/imx-common/cpu.c
index 6d7486b..3d58d8a 100644
--- a/arch/arm/cpu/armv7/imx-common/cpu.c
+++ b/arch/arm/cpu/armv7/imx-common/cpu.c
@@ -64,13 +64,33 @@ static char *get_reset_cause(void)
}
#if defined(CONFIG_DISPLAY_CPUINFO)
+
+static char *get_imx_type(u32 imxtype)
+{
+ switch (imxtype) {
+ case 0x63:
+ return "6Q"; /* Quad-core version of the mx6 */
+ case 0x61:
+ return "6DS"; /* Dual/Solo version of the mx6 */
+ case 0x60:
+ return "6SL"; /* Solo-Lite version of the mx6 */
+ case 0x51:
+ return "51";
+ case 0x53:
+ return "53";
+ default:
+ return "unknown";
+ }
+}
+
int print_cpuinfo(void)
{
u32 cpurev;
cpurev = get_cpu_rev();
- printf("CPU: Freescale i.MX%x family rev%d.%d at %d MHz\n",
- (cpurev & 0xFF000) >> 12,
+
+ printf("CPU: Freescale i.MX%s rev%d.%d at %d MHz\n",
+ get_imx_type((cpurev & 0xFF000) >> 12),
(cpurev & 0x000F0) >> 4,
(cpurev & 0x0000F) >> 0,
mxc_get_clock(MXC_ARM_CLK) / 1000000);