/* Read HW ID from I2C EEPROM and detect the modue we are running on. Note that we need to use local variable for readout, because global data is not writable yet (and we'll have to redo the readout later on).  */
int checkboard(void)
/* Read HW ID from I2C EEPROM and detect the modue we are running on. Note that we need to use local variable for readout, because global data is not writable yet (and we'll have to redo the readout later on).  */
int checkboard(void)
{
	hw_id_t hw_id_tmp;
	char module_name_tmp[MODULE_NAME_MAXLEN] = "";
	gd->flags |= GD_FLG_SILENT;
	i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
	gd->flags &= ~GD_FLG_SILENT;
	read_hw_id(hw_id_tmp);
	identify_module(hw_id_tmp);
	compose_module_name(hw_id_tmp, module_name_tmp);
	if (gd->board_type != CM5200_UNKNOWN_MODULE)
		printf("Board: %s\n", module_name_tmp);
	else
		printf("Board: unrecognized cm5200 module (%s)\n",
			module_name_tmp);
	return 0;
}