Bugfix Release STK5 2010-10-04
[karo-tx-redboot.git] / packages / hal / arm / mx25 / var / v2_0 / src / soc_misc.c
index 13283fb..66f5fb0 100644 (file)
@@ -95,7 +95,7 @@ static int find_correct_chip;
 /*
  * This functions reads the IIM module and returns the system revision number.
  * It returns the IIM silicon revision reg value if valid product rev is found.
. Otherwise, it returns -1.
* Otherwise, it returns CHIP_VERSION_NONE.
  */
 static int read_system_rev(void)
 {
@@ -108,9 +108,7 @@ static int read_system_rev(void)
         * the lowest revision number */
        if ((MXC_GET_FIELD(val, IIM_PROD_REV_LEN, IIM_PROD_REV_SH) !=
                        PROD_SIGNATURE_SUPPORTED_1)) {
-#if 0
                return CHIP_VERSION_NONE;
-#endif
        }
 
        /* Now trying to retrieve the silicon rev from IIM's SREV register */
@@ -132,18 +130,23 @@ void hal_hardware_init(void)
                if (ver == 0x0) {
                        HAL_PLATFORM_EXTRA[5] = '1';
                        HAL_PLATFORM_EXTRA[7] = '0';
-                       system_rev |= 1 << MAJOR_NUMBER_OFFSET; /*Major Number*/
-                       system_rev |= 0 << MINOR_NUMBER_OFFSET; /*Minor Number*/
+                       system_rev |= 1 << MAJOR_NUMBER_OFFSET;
+                       system_rev |= 0 << MINOR_NUMBER_OFFSET;
                } else if (ver == 0x1) {
                        HAL_PLATFORM_EXTRA[5] = '1';
                        HAL_PLATFORM_EXTRA[7] = '1';
-                       system_rev |= 1 << MAJOR_NUMBER_OFFSET; /*Major Number*/
-                       system_rev |= 1 << MINOR_NUMBER_OFFSET; /*Minor Number*/
+                       system_rev |= 1 << MAJOR_NUMBER_OFFSET;
+                       system_rev |= 1 << MINOR_NUMBER_OFFSET;
+               } else if (ver == 0x2) {
+                       HAL_PLATFORM_EXTRA[5] = '1';
+                       HAL_PLATFORM_EXTRA[7] = '1';
+                       system_rev |= 1 << MAJOR_NUMBER_OFFSET;
+                       system_rev |= 2 << MINOR_NUMBER_OFFSET;
                } else {
-                       HAL_PLATFORM_EXTRA[5] = 'z';
-                       HAL_PLATFORM_EXTRA[7] = 'z';
-                       system_rev |= 1 << MAJOR_NUMBER_OFFSET; /*Major Number*/
-                       system_rev |= 0 << MINOR_NUMBER_OFFSET; /*Minor Number*/
+                       HAL_PLATFORM_EXTRA[5] = '-';
+                       HAL_PLATFORM_EXTRA[7] = '-';
+                       system_rev |= 1 << MAJOR_NUMBER_OFFSET;
+                       system_rev |= 0 << MINOR_NUMBER_OFFSET;
                        find_correct_chip = CHIP_VERSION_UNKNOWN;
                }
        }