/* Read header information from EEPROM into global structure.  */
static struct shc_eeprom __attribute__((section(".data")))
/* Read header information from EEPROM into global structure.  */
static struct shc_eeprom __attribute__((section(".data")))
{
	if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) {
		puts("Could not probe the EEPROM; something fundamentally wrong on the I2C bus.\n");
		return -ENODEV;
	}
	if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 2, (uchar *)&header,
		     sizeof(header))) {
		puts("Could not read the EEPROM; something fundamentally wrong on the I2C bus.\n");
		return -EIO;
	}
	if (header.magic != HDR_MAGIC) {
		printf("Incorrect magic number (0x%x) in EEPROM\n",
		       header.magic);
		return -EIO;
	}
	shc_eeprom_valid = 1;
	return 0;
}