[U-Boot-Users] [PATCH] Support for new I2C RTC

Hi there,
the attached patch adds support for a I2C RTC DS1338 for Dallas/Maxim. DS1307 and DS1338 are basicly the same, they only differ in their supply voltage.
* Patches by Steven Scholz, 11 Apr 2003 - Add support for RTC DS1338
Cheers,
Steven
Index: README =================================================================== RCS file: /home/cvsroot/u-boot/README,v retrieving revision 1.1.1.1 diff -p -u -r1.1.1.1 README --- README 5 Apr 2003 00:13:43 -0000 1.1.1.1 +++ README 11 Apr 2003 10:42:22 -0000 @@ -638,6 +638,7 @@ The following options need to be configu CONFIG_RTC_MC146818 - use MC146818 RTC CONFIG_RTC_DS1307 - use Maxim, Inc. DS1307 RTC CONFIG_RTC_DS1337 - use Maxim, Inc. DS1337 RTC + CONFIG_RTC_DS1338 - use Maxim, Inc. DS1338 RTC CONFIG_RTC_DS164x - use Dallas DS164x RTC
- Timestamp Support: Index: rtc/ds1307.c =================================================================== RCS file: /home/cvsroot/u-boot/rtc/ds1307.c,v retrieving revision 1.1.1.1 diff -p -u -r1.1.1.1 ds1307.c --- rtc/ds1307.c 6 Mar 2003 21:26:28 -0000 1.1.1.1 +++ rtc/ds1307.c 10 Apr 2003 11:27:09 -0000 @@ -25,7 +25,7 @@
/* * Date & Time support (no alarms) for Dallas Semiconductor (now Maxim) - * DS1307 Real Time Clock (RTC). + * DS1307 and DS1338 Real Time Clock (RTC). * * based on ds1337.c */ @@ -35,7 +35,8 @@ #include <rtc.h> #include <i2c.h>
-#if defined(CONFIG_RTC_DS1307) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if (defined(CONFIG_RTC_DS1307) || defined(CONFIG_RTC_DS1338) ) && \ + (CONFIG_COMMANDS & CFG_CMD_DATE)
/*---------------------------------------------------------------------*/ #undef DEBUG_RTC @@ -200,4 +201,4 @@ static unsigned char bin2bcd (unsigned i return (((n / 10) << 4) | (n % 10)); }
-#endif /* CONFIG_RTC_DS1307 && (CFG_COMMANDS & CFG_CMD_DATE) */ +#endif /* (CONFIG_RTC_DS1307 || CONFIG_RTC_DS1338) && (CFG_COMMANDS & CFG_CMD_DATE) */

Dear Steven,
in message 3E96C4CD.1060006@imc-berlin.de you wrote:
the attached patch adds support for a I2C RTC DS1338 for Dallas/Maxim. DS1307 and DS1338 are basicly the same, they only differ in their supply voltage.
Thanks, added to local CVS, will push to public server later.
Best regards,
Wolfgang Denk
participants (2)
-
Steven Scholz
-
Wolfgang Denk