1 diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
2 index 9a879f9..9cefef4 100644
3 --- a/arch/arm/mach-omap2/id.c
4 +++ b/arch/arm/mach-omap2/id.c
5 @@ -85,6 +85,9 @@ EXPORT_SYMBOL(omap_type);
7 #define read_tap_reg(reg) __raw_readl(tap_base + (reg))
9 +static ssize_t die_id_show(struct kobject *, struct kobj_attribute *, char *);
10 +static struct kobj_attribute die_id_attr = __ATTR(die_id, 0444, die_id_show, NULL);
13 u16 hawkeye; /* Silicon type (Hawkeye id) */
14 u8 dev; /* Device type from production_id reg */
15 @@ -104,6 +107,17 @@ static struct omap_id omap_ids[] __initdata = {
16 static void __iomem *tap_base;
17 static u16 tap_prod_id;
19 +static ssize_t die_id_show(struct kobject *kobj, struct kobj_attribute *attr,
22 + return sprintf(buf, "Die ID: %08x%08x%08x%08x\n",
23 + read_tap_reg(OMAP_TAP_DIE_ID_0),
24 + read_tap_reg(OMAP_TAP_DIE_ID_1),
25 + read_tap_reg(OMAP_TAP_DIE_ID_2),
26 + read_tap_reg(OMAP_TAP_DIE_ID_3));
30 void omap_get_die_id(struct omap_die_id *odi)
32 odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_0);
33 @@ -457,3 +471,15 @@ void __init omap2_set_globals_tap(struct omap_globals *omap2_globals)
38 +int __init export_omap_die_id(void)
42 + error = sysfs_create_file(power_kobj, &die_id_attr.attr);
44 + printk(KERN_ERR "sysfs_create_file failed: %d\n", error);
48 +late_initcall(export_omap_die_id);