]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
NetStar: add RTC support
authorLadislav Michl <ladis@linux-mips.org>
Wed, 25 Mar 2009 22:43:58 +0000 (23:43 +0100)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sun, 29 Mar 2009 14:04:51 +0000 (16:04 +0200)
Add RTC support.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
board/netstar/netstar.c
include/configs/netstar.h

index a76b338f5519772fde625510eeaf37bbae1a8647..19a70ef623508d427252f4219eb7f3e8edd806ee 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <i2c.h>
 #include <flash.h>
 
 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;
 }
 
index e0cc7186a9d345d5d02c803463012b0b6f67ee95..1110eccb4d958637c7b4593a58b8db6e33a866b8 100644 (file)
 #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
  */
 #define CONFIG_CMD_BDI
 #define CONFIG_CMD_BOOTD
+#define CONFIG_CMD_DATE
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_SAVEENV
 #define CONFIG_CMD_FLASH