summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-03-15 22:09:18 +0100
committerWolfgang Denk <wd@denx.de>2009-03-15 22:09:18 +0100
commit06ecf088478aed889a4153978c2e30fb02cf41ea (patch)
treec4b0722478298cb50127fabf9b3b4bce1a80b371 /cpu
parentcd309029f2b8a1a09c484c5766e897b8791c7cfe (diff)
parente6a6a704151c2d7e4a7b485545b48a6020ccca17 (diff)
downloadu-boot-imx-06ecf088478aed889a4153978c2e30fb02cf41ea.zip
u-boot-imx-06ecf088478aed889a4153978c2e30fb02cf41ea.tar.gz
u-boot-imx-06ecf088478aed889a4153978c2e30fb02cf41ea.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'cpu')
-rw-r--r--cpu/arm_cortexa8/omap3/sys_info.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c
index 28a1020..b385b91 100644
--- a/cpu/arm_cortexa8/omap3/sys_info.c
+++ b/cpu/arm_cortexa8/omap3/sys_info.c
@@ -36,6 +36,32 @@ static gpmc_csx_t *gpmc_cs_base = (gpmc_csx_t *)GPMC_CONFIG_CS0_BASE;
static sdrc_t *sdrc_base = (sdrc_t *)OMAP34XX_SDRC_BASE;
static ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
+/*****************************************************************
+ * dieid_num_r(void) - read and set die ID
+ *****************************************************************/
+void dieid_num_r(void)
+{
+ ctrl_id_t *id_base = (ctrl_id_t *)OMAP34XX_ID_L4_IO_BASE;
+ char *uid_s, die_id[34];
+ u32 id[4];
+
+ memset(die_id, 0, sizeof(die_id));
+
+ uid_s = getenv("dieid#");
+
+ if (uid_s == NULL) {
+ id[3] = readl(&id_base->die_id_0);
+ id[2] = readl(&id_base->die_id_1);
+ id[1] = readl(&id_base->die_id_2);
+ id[0] = readl(&id_base->die_id_3);
+ sprintf(die_id, "%08x%08x%08x%08x", id[0], id[1], id[2], id[3]);
+ setenv("dieid#", die_id);
+ uid_s = die_id;
+ }
+
+ printf("Die ID #%s\n", uid_s);
+}
+
/******************************************
* get_cpu_type(void) - extract cpu info
******************************************/