This introduces omap_die_id_display to display the full die id.
There is no need to store it in an environment variable, that no boot script
is using anyway.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
eth_setenv_enetaddr("usbethaddr", mac);
}
}
+
+void omap_die_id_display(void)
+{
+ unsigned int die_id[4] = { 0 };
+
+ omap_die_id(die_id);
+
+ printf("OMAP die ID: %08x%08x%08x%08x", die_id[0], die_id[1], die_id[2],
+ die_id[3]);
+}
*/
int __weak misc_init_r(void)
{
- dieid_num_r();
+ omap_die_id_display();
return 0;
}
die_id[3] = readl(&id_base->die_id_3);
}
-/*****************************************************************
- * dieid_num_r(void) - read and set die ID
- *****************************************************************/
-void dieid_num_r(void)
-{
- char *uid_s, die_id[34];
- u32 id[4];
-
- memset(die_id, 0, sizeof(die_id));
-
- uid_s = getenv("dieid#");
-
- if (uid_s == NULL) {
- omap_die_id(id);
- 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
******************************************/
void make_cs1_contiguous(void);
void omap_nand_switch_ecc(uint32_t, uint32_t);
void power_init_r(void);
-void dieid_num_r(void);
void do_omap3_emu_romcode_call(u32 service_id, u32 parameters);
void omap3_set_aux_cr_secure(u32 acr);
u32 warm_reset(void);
void omap_die_id_serial(void);
void omap_die_id_usbethaddr(void);
+void omap_die_id_display(void);
void recalibrate_iodelay(void);
int misc_init_r(void)
{
cl_print_pcb_info();
- dieid_num_r();
+ omap_die_id_display();
return 0;
}
int misc_init_r(void)
{
cl_print_pcb_info();
- dieid_num_r();
+ omap_die_id_display();
return 0;
}
status_led_set(1, STATUS_LED_ON);
status_led_set(2, STATUS_LED_ON);
- dieid_num_r();
+ omap_die_id_display();
return 0;
}
setup_net_chip();
- dieid_num_r();
+ omap_die_id_display();
set_fdt();
i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
#endif
- dieid_num_r();
+ omap_die_id_display();
am3517_evm_musb_init();
{
twl4030_power_init();
twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
- dieid_num_r();
+ omap_die_id_display();
/*
* Board Reset
/* reuse atags from previous bootloader */
reuse_atags();
- dieid_num_r();
+ omap_die_id_display();
print_cpuinfo();
/*
if (expansion_config.content == 1)
setenv(expansion_config.env_var, expansion_config.env_setting);
- dieid_num_r();
+ omap_die_id_display();
if (get_cpu_family() == CPU_OMAP34XX)
setenv("boardname", "overo");
TWL4030_BB_CFG_BBCHEN | TWL4030_BB_CFG_BBSEL_3200MV |
TWL4030_BB_CFG_BBISEL_500UA);
- dieid_num_r();
+ omap_die_id_display();
return 0;
}
puts("Unknown board revision\n");
}
- dieid_num_r();
+ omap_die_id_display();
return 0;
}
struct tam3517_module_info info;
int ret;
- dieid_num_r();
+ omap_die_id_display();
eth_addr = getenv("ethaddr");
if (eth_addr)
int ret;
TAM3517_READ_EEPROM(&info, ret);
- dieid_num_r();
+ omap_die_id_display();
if (ret)
return 0;
i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
#endif
- dieid_num_r();
+ omap_die_id_display();
return 0;
}
writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe);
- dieid_num_r();
+ omap_die_id_display();
#ifdef CONFIG_VIDEO_OMAP3
beagle_dvi_pup();
#if defined(CONFIG_CMD_NET)
reset_net_chip();
#endif
- dieid_num_r();
+ omap_die_id_display();
return 0;
}
}
#endif
- dieid_num_r();
+ omap_die_id_display();
return 0;
}