From: Ladislav Michl Date: Wed, 25 Mar 2009 22:43:58 +0000 (+0100) Subject: NetStar: add RTC support X-Git-Tag: v2009.06-rc1~112^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04531f3c11c693dc54924f82c41979d960309c9d;p=platform%2Fkernel%2Fu-boot.git NetStar: add RTC support Add RTC support. Signed-off-by: Ladislav Michl --- diff --git a/board/netstar/netstar.c b/board/netstar/netstar.c index a76b338..19a70ef 100644 --- a/board/netstar/netstar.c +++ b/board/netstar/netstar.c @@ -21,6 +21,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -53,6 +54,10 @@ int dram_init(void) int misc_init_r(void) { +#if defined(CONFIG_RTC_DS1307) + /* enable trickle charge */ + i2c_reg_write(CONFIG_SYS_I2C_RTC_ADDR, 0x10, 0xaa); +#endif return 0; } diff --git a/include/configs/netstar.h b/include/configs/netstar.h index e0cc718..1110ecc 100644 --- a/include/configs/netstar.h +++ b/include/configs/netstar.h @@ -110,6 +110,14 @@ #define CONFIG_SYS_NAND_BASE 0x04000000 + (2 << 23) #define NAND_ALLOW_ERASE_ALL 1 +#define CONFIG_HARD_I2C +#define CONFIG_SYS_I2C_SPEED 100000 +#define CONFIG_SYS_I2C_SLAVE 1 +#define CONFIG_DRIVER_OMAP1510_I2C + +#define CONFIG_RTC_DS1307 +#define CONFIG_SYS_I2C_RTC_ADDR 0x68 + #define CONFIG_CONS_INDEX 1 #define CONFIG_BAUDRATE 115200 @@ -133,6 +141,7 @@ */ #define CONFIG_CMD_BDI #define CONFIG_CMD_BOOTD +#define CONFIG_CMD_DATE #define CONFIG_CMD_DHCP #define CONFIG_CMD_SAVEENV #define CONFIG_CMD_FLASH