From: Wolfgang Denk Date: Thu, 05 Jan 2012 15:56:11 +0100 Subject: [U-Boot] [PATCH v2 3/6] cm-t35: add EEPROM module and pass Linux a serial number In-Reply-To: <1325764937-7342-1-git-send-email-grinberg@compulab.co.il> References: <4F031628.9070502@ti.com> <1325764937-7342-1-git-send-email-grinberg@compulab.co.il> Message-ID: <20120105145611.47A9082518@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Igor Grinberg, In message <1325764937-7342-1-git-send-email-grinberg@compulab.co.il> you wrote: > From: Nikita Kiryanov > > Add board specific EEPROM handling module, > read the serial number from the EEPROM and pass it to Linux. ... > * Fix strange linker warning: ".bss section overlaps previous sections" > by changing the type of the eeprom_layout static global variable to int > (probably this is a compiler bug). Probably it is now. Did you inspect the linke rmap? > +static int cm_t3x_eeprom_read(uint offset, uchar *buf, int len) > +{ > + return i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, offset, > + CONFIG_SYS_I2C_EEPROM_ADDR_LEN, buf, len); > +} Is there any specific reason why you cannot use the standard eeprom_read() function here? > --- /dev/null > +++ b/board/cm_t35/eeprom.h ... > +#ifndef CONFIG_DRIVER_OMAP34XX_I2C > +void get_board_serial(struct tag_serialnr *serialnr) > +{ > + /* > + * This corresponds to what happens when we can communicate with the > + * eeprom but don't get a valid board serial value. > + */ > + serialnr->low = 0; > + serialnr->high = 0; > +}; > +#endif /* CONFIG_DRIVER_OMAP34XX_I2C */ Please do NOT place code into header files. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A mouse is an elephant built by the Japanese.