Add RTC support. Signed-off-by: Ladislav Michl <la...@linux-mips.org>
--- a/include/configs/netstar.h 2009-03-16 15:42:01.000000000 +0100 +++ b/include/configs/netstar.h 2009-03-16 15:43:33.000000000 +0100 @@ -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 --- a/board/netstar/netstar.c 2009-03-16 15:43:59.000000000 +0100 +++ b/board/netstar/netstar.c 2009-03-16 15:44:51.000000000 +0100 @@ -22,6 +22,7 @@ #include <common.h> #include <flash.h> +#include <i2c.h> #include <nand.h> #include <asm/io.h> @@ -56,6 +57,10 @@ 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; } _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot