diff options
author | Jason Liu <r64343@freescale.com> | 2012-04-17 11:06:52 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-04-18 18:40:57 +0800 |
commit | 7b0cbbd4d074a2a25ff5dbdac554260c06088bc0 (patch) | |
tree | 034308ddb22e8799c230b77d7293e2bd611f0c18 /board/freescale | |
parent | a9f787edee4e83d74573add7537cbff91e66b004 (diff) | |
download | u-boot-imx-7b0cbbd4d074a2a25ff5dbdac554260c06088bc0.zip u-boot-imx-7b0cbbd4d074a2a25ff5dbdac554260c06088bc0.tar.gz u-boot-imx-7b0cbbd4d074a2a25ff5dbdac554260c06088bc0.tar.bz2 |
ENGR00179762: i.MX6: print the SOC revision correctly
For example: The soc rev on i.mx6dl rev 1.0 not print correctly:
CPU: Freescale i.MX 6 family 0.0V at 792 MHz
This patch help u-boot print out the SOC revision correctly:
CPU: Freescale i.MX6 family TO1.0 at 792 MHz
Signed-off-by: Jason Liu <r64343@freescale.com>
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/common/fsl_sys_rev.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/board/freescale/common/fsl_sys_rev.c b/board/freescale/common/fsl_sys_rev.c index 26f9f17..ba4c367 100644 --- a/board/freescale/common/fsl_sys_rev.c +++ b/board/freescale/common/fsl_sys_rev.c @@ -63,13 +63,20 @@ void fsl_set_system_rev(void) * i.MX6Q1.0: 6300 00 * i.MX6Q1.1: 6300 01 * i.MX6Solo1.0: 6100 00 + + * Thus the system_rev will be the following layout: + * | 31 - 20 | 19 - 12 | 11 - 8 | 7 - 0 | + * | resverd | CHIP ID | BD REV | SI REV | */ u32 cpu_type = readl(ANATOP_BASE_ADDR + 0x260); u32 board_type = 0; /* Chip Silicon ID */ - fsl_system_rev = (cpu_type >> 4) & 0xFF000; - /* Chip Revision ID */ - fsl_system_rev |= (cpu_type & 0xFF); + fsl_system_rev = ((cpu_type >> 16) & 0xFF) << 12; + /* Chip silicon major revision */ + fsl_system_rev |= ((cpu_type >> 8) & 0xFF) << 4; + fsl_system_rev += 0x10; + /* Chip silicon minor revision */ + fsl_system_rev |= cpu_type & 0xFF; /* Get Board ID information from OCOTP_GP1[15:8] * bit 12-15: Board type |