All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/5] NetStar: add RTC support
Date: Mon, 16 Mar 2009 23:30:25 +0100	[thread overview]
Message-ID: <20090316223025.GE1879@localhost.localdomain> (raw)
In-Reply-To: <20090316222620.GA1879@localhost.localdomain>

Add RTC support.

Signed-off-by: Ladislav Michl <ladis@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;
 }
 

  parent reply	other threads:[~2009-03-16 22:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13 13:31 [U-Boot] [PATCH] Update board NetStar Ladislav Michl
2009-03-16 22:26 ` Ladislav Michl
2009-03-16 22:27   ` [U-Boot] [PATCH 1/5] NetStar: config reindentation Ladislav Michl
2009-03-18 19:42     ` Wolfgang Denk
2009-03-16 22:28   ` [U-Boot] [PATCH 2/5] NetStar: Fix NAND Ladislav Michl
2009-03-17 17:17     ` Scott Wood
2009-03-17 19:50       ` Ladislav Michl
2009-03-17 19:10         ` Scott Wood
2009-03-16 22:29   ` [U-Boot] [PATCH 3/5] NetStar: use generic flash driver Ladislav Michl
2009-03-18 19:44     ` Wolfgang Denk
2009-03-25  0:14       ` Ladislav Michl
2009-03-16 22:30   ` Ladislav Michl [this message]
2009-03-16 22:31   ` [U-Boot] [PATCH 5/5] NetStar: update crcit utility Ladislav Michl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090316223025.GE1879@localhost.localdomain \
    --to=ladis@linux-mips.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.