diff options
author | Zhang Jiejing <jiejing.zhang@freescale.com> | 2012-08-27 17:53:59 +0800 |
---|---|---|
committer | Zhang Jiejing <jiejing.zhang@freescale.com> | 2012-08-31 12:20:22 +0800 |
commit | 794288699c9b66afdb1a39c84e65066c0c44d5f0 (patch) | |
tree | 9adc62f4955d0269bffbea380a15ae70f78610b6 /cpu | |
parent | eec0c300a53aedb1d4ec032f9dc6079be19a6052 (diff) |
ENGR00221503-2 imx6: add cpu serial number support.
add cpu serial number tag, kernel will read this
number and put it in /proc/cpuinfo, as 'Serial' part
it can be used as a UUID source in software.
Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/arm_cortexa8/mx6/generic.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpu/arm_cortexa8/mx6/generic.c b/cpu/arm_cortexa8/mx6/generic.c index f0a9ce2..60c87c7 100644 --- a/cpu/arm_cortexa8/mx6/generic.c +++ b/cpu/arm_cortexa8/mx6/generic.c @@ -51,6 +51,10 @@ #include <asm/arch/mx6_secure.h> #endif +#ifdef CONFIG_SERIAL_TAG +#include <imx_otp.h> +#endif + enum pll_clocks { CPU_PLL1, /* System PLL */ BUS_PLL2, /* System Bus PLL*/ @@ -1426,3 +1430,11 @@ struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { }, }; #endif + +#ifdef CONFIG_SERIAL_TAG +void get_board_serial(struct tag_serialnr *serialnr) +{ + imx_otp_read_one_u32(CPU_UID_LOW_FUSE_INDEX, &serialnr->low); + imx_otp_read_one_u32(CPU_UID_HIGH_FUSE_INDEX, &serialnr->high); +} +#endif |