ARM: uniphier: display revision of Micro Support Card 3.6.x kindly
[platform/kernel/u-boot.git] / arch / arm / mach-uniphier / micro-support-card.c
index eeb515a..6987d1e 100644 (file)
@@ -1,5 +1,7 @@
 /*
- * Copyright (C) 2012-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2012-2015 Panasonic Corporation
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -38,7 +40,12 @@ static int support_card_show_revision(void)
        u32 revision;
 
        revision = readl(MICRO_SUPPORT_CARD_REVISION);
-       printf("(CPLD version %d.%d)\n", revision >> 4, revision & 0xf);
+       revision &= 0xff;
+
+       /* revision 3.6.x card changed the revision format */
+       printf("(CPLD version %s%d.%d)\n", revision >> 4 == 6 ? "3." : "",
+              revision >> 4, revision & 0xf);
+
        return 0;
 }