[PATCH 10/16] i.MX: Add revision detection for i.MX6D/Q Plus
Andrey Smirnov
andrew.smirnov at gmail.com
Tue Mar 15 20:33:45 PDT 2016
Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
arch/arm/mach-imx/imx6.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index 0fdd785..f80334d 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -123,7 +123,8 @@ int imx6_init(void)
imx6_boot_save_loc((void *)MX6_SRC_BASE_ADDR);
rev = readl(MX6_ANATOP_BASE_ADDR + SI_REV);
- switch (rev & 0xff) {
+
+ switch (rev & 0xfff) {
case 0x00:
mx6_silicon_revision = IMX_CHIP_REV_1_0;
break;
@@ -148,16 +149,26 @@ int imx6_init(void)
mx6_silicon_revision = IMX_CHIP_REV_1_5;
break;
+ case 0x100:
+ mx6_silicon_revision = IMX_CHIP_REV_2_0;
+ break;
+
default:
mx6_silicon_revision = IMX_CHIP_REV_UNKNOWN;
}
switch (imx6_cpu_type()) {
case IMX6_CPUTYPE_IMX6Q:
- cputypestr = "i.MX6 Quad";
+ if (mx6_silicon_revision >= IMX_CHIP_REV_2_0)
+ cputypestr = "i.MX6 Quad Plus";
+ else
+ cputypestr = "i.MX6 Quad";
break;
case IMX6_CPUTYPE_IMX6D:
- cputypestr = "i.MX6 Dual";
+ if (mx6_silicon_revision >= IMX_CHIP_REV_2_0)
+ cputypestr = "i.MX6 Dual Plus";
+ else
+ cputypestr = "i.MX6 Dual";
break;
case IMX6_CPUTYPE_IMX6DL:
cputypestr = "i.MX6 DualLite";
--
2.5.0
More information about the barebox
mailing list