diff options
Diffstat (limited to 'arch/arm/mach-omap2/id.c')
-rw-r--r-- | arch/arm/mach-omap2/id.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index f61f1bf68df4..43969da5d50b 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -628,6 +628,41 @@ void __init omap5xxx_check_revision(void) | |||
628 | pr_info("%s %s\n", soc_name, soc_rev); | 628 | pr_info("%s %s\n", soc_name, soc_rev); |
629 | } | 629 | } |
630 | 630 | ||
631 | void __init dra7xxx_check_revision(void) | ||
632 | { | ||
633 | u32 idcode; | ||
634 | u16 hawkeye; | ||
635 | u8 rev; | ||
636 | |||
637 | idcode = read_tap_reg(OMAP_TAP_IDCODE); | ||
638 | hawkeye = (idcode >> 12) & 0xffff; | ||
639 | rev = (idcode >> 28) & 0xff; | ||
640 | switch (hawkeye) { | ||
641 | case 0xb990: | ||
642 | switch (rev) { | ||
643 | case 0: | ||
644 | omap_revision = DRA752_REV_ES1_0; | ||
645 | break; | ||
646 | case 1: | ||
647 | default: | ||
648 | omap_revision = DRA752_REV_ES1_1; | ||
649 | } | ||
650 | break; | ||
651 | |||
652 | default: | ||
653 | /* Unknown default to latest silicon rev as default*/ | ||
654 | pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n", | ||
655 | __func__, idcode, hawkeye, rev); | ||
656 | omap_revision = DRA752_REV_ES1_1; | ||
657 | } | ||
658 | |||
659 | sprintf(soc_name, "DRA%03x", omap_rev() >> 16); | ||
660 | sprintf(soc_rev, "ES%d.%d", (omap_rev() >> 12) & 0xf, | ||
661 | (omap_rev() >> 8) & 0xf); | ||
662 | |||
663 | pr_info("%s %s\n", soc_name, soc_rev); | ||
664 | } | ||
665 | |||
631 | /* | 666 | /* |
632 | * Set up things for map_io and processor detection later on. Gets called | 667 | * Set up things for map_io and processor detection later on. Gets called |
633 | * pretty much first thing from board init. For multi-omap, this gets | 668 | * pretty much first thing from board init. For multi-omap, this gets |
@@ -669,6 +704,8 @@ static const char * __init omap_get_family(void) | |||
669 | return kasprintf(GFP_KERNEL, "OMAP5"); | 704 | return kasprintf(GFP_KERNEL, "OMAP5"); |
670 | else if (soc_is_am43xx()) | 705 | else if (soc_is_am43xx()) |
671 | return kasprintf(GFP_KERNEL, "AM43xx"); | 706 | return kasprintf(GFP_KERNEL, "AM43xx"); |
707 | else if (soc_is_dra7xx()) | ||
708 | return kasprintf(GFP_KERNEL, "DRA7"); | ||
672 | else | 709 | else |
673 | return kasprintf(GFP_KERNEL, "Unknown"); | 710 | return kasprintf(GFP_KERNEL, "Unknown"); |
674 | } | 711 | } |