
On Sun, Oct 19, 2014 at 05:52:13PM +0400, Dvorkin Dmitry wrote:
Hello!
We are developing new board based on TI am33xx. (I'll send patch for this new board later.) It have not internal RTC and we're using the one from TPS65910 connected by I2C bus. May I add this patch to U-Boot source? Thank you.
In general, yes. First, please see http://www.denx.de/wiki/U-Boot/Patches and submit it with a signed-off-by line, in the series with your board port that uses it. Also, fix all of the checkpatch issues that I suspect it would point out. Aside from things like that:
+#if defined(CONFIG_CMD_DATE)
No, don't guard the whole file on another config option please.
+/*---------------------------------------------------------------------*/ +#undef DEBUG_RTC
+#ifdef DEBUG_RTC +#define DEBUGR(fmt,args...) printf(fmt ,##args) +#else +#define DEBUGR(fmt,args...) +#endif
Just use debug() from <common.h> and DEBUG to control it so you don't need #undef anything in your driver.
+/* usually TPS65910_CTRL_I2C_ADDR = 0x2D */ +#ifndef CONFIG_SYS_I2C_RTC_ADDR +#define CONFIG_SYS_I2C_RTC_ADDR TPS65910_CTRL_I2C_ADDR +#endif
This belongs in the board config file.