diff options
author | Markus Klotzbuecher <mk@denx.de> | 2007-08-07 22:30:29 +0200 |
---|---|---|
committer | Markus Klotzbuecher <mk@pollux.denx.de> | 2007-08-07 22:30:29 +0200 |
commit | 78549bbf44bd2c8d1a0730fb068836071751afaa (patch) | |
tree | 92f002dc9772874bc3c884b1caa5607763c2c276 /rtc | |
parent | 9b7464a2c88614e1061f509c48930a3d240d1a35 (diff) | |
parent | b23b547597ff2375ad13a9ab04e5257a3ad76c99 (diff) | |
download | u-boot-imx-78549bbf44bd2c8d1a0730fb068836071751afaa.zip u-boot-imx-78549bbf44bd2c8d1a0730fb068836071751afaa.tar.gz u-boot-imx-78549bbf44bd2c8d1a0730fb068836071751afaa.tar.bz2 |
Merge with git://www.denx.de/git/u-boot.git
Diffstat (limited to 'rtc')
-rw-r--r-- | rtc/bf5xx_rtc.c | 4 | ||||
-rw-r--r-- | rtc/date.c | 4 | ||||
-rw-r--r-- | rtc/ds12887.c | 4 | ||||
-rw-r--r-- | rtc/ds1302.c | 2 | ||||
-rw-r--r-- | rtc/ds1306.c | 2 | ||||
-rw-r--r-- | rtc/ds1307.c | 4 | ||||
-rw-r--r-- | rtc/ds1337.c | 4 | ||||
-rw-r--r-- | rtc/ds1374.c | 4 | ||||
-rw-r--r-- | rtc/ds1556.c | 4 | ||||
-rw-r--r-- | rtc/ds164x.c | 4 | ||||
-rw-r--r-- | rtc/ds174x.c | 4 | ||||
-rw-r--r-- | rtc/ds3231.c | 4 | ||||
-rw-r--r-- | rtc/m41t11.c | 4 | ||||
-rw-r--r-- | rtc/m48t35ax.c | 4 | ||||
-rw-r--r-- | rtc/max6900.c | 4 | ||||
-rw-r--r-- | rtc/mc146818.c | 4 | ||||
-rw-r--r-- | rtc/mk48t59.c | 4 | ||||
-rw-r--r-- | rtc/mpc5xxx.c | 4 | ||||
-rw-r--r-- | rtc/mpc8xx.c | 6 | ||||
-rw-r--r-- | rtc/pcf8563.c | 4 | ||||
-rw-r--r-- | rtc/rs5c372.c | 4 | ||||
-rw-r--r-- | rtc/s3c24x0_rtc.c | 6 |
22 files changed, 42 insertions, 46 deletions
diff --git a/rtc/bf5xx_rtc.c b/rtc/bf5xx_rtc.c index 85bbb56..8856bb9 100644 --- a/rtc/bf5xx_rtc.c +++ b/rtc/bf5xx_rtc.c @@ -49,7 +49,7 @@ #include <command.h> #include <rtc.h> -#if defined(CONFIG_RTC_BFIN) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_BFIN) && defined(CONFIG_CMD_DATE) #include <asm/blackfin.h> #include <asm/arch/bf5xx_rtc.h> @@ -140,4 +140,4 @@ void rtc_get(struct rtc_time *tmp) MIN_TO_SECS(tm_min) + HRS_TO_SECS(tm_hour) + DAYS_TO_SECS(tm_day); to_tm(time_in_sec, tmp); } -#endif /* CONFIG_RTC_BFIN && CFG_CMD_DATE */ +#endif @@ -29,7 +29,7 @@ #include <command.h> #include <rtc.h> -#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_TIMESTAMP) +#if defined(CONFIG_CMD_DATE) || defined(CONFIG_TIMESTAMP) #define FEBRUARY 2 #define STARTOFTIME 1970 @@ -153,4 +153,4 @@ mktime (unsigned int year, unsigned int mon, )*60 + sec; /* finally seconds */ } -#endif /* CFG_CMD_DATE */ +#endif diff --git a/rtc/ds12887.c b/rtc/ds12887.c index 8b12893..84fecf0 100644 --- a/rtc/ds12887.c +++ b/rtc/ds12887.c @@ -28,7 +28,7 @@ #include <config.h> #include <rtc.h> -#if defined(CONFIG_RTC_DS12887) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS12887) && defined(CONFIG_CMD_DATE) #define RTC_SECONDS 0x00 #define RTC_SECONDS_ALARM 0x01 @@ -235,4 +235,4 @@ void rtc_reset (void) rtc_write(RTC_CONTROL_B,ctrl_rg); } -#endif /* (CONFIG_RTC_DS12887) && (CONFIG_COMMANDS & CFG_CMD_DATE) */ +#endif diff --git a/rtc/ds1302.c b/rtc/ds1302.c index 98dce89..55af130 100644 --- a/rtc/ds1302.c +++ b/rtc/ds1302.c @@ -9,7 +9,7 @@ #include <command.h> #include <rtc.h> -#if defined(CONFIG_RTC_DS1302) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS1302) && defined(CONFIG_CMD_DATE) /* GPP Pins */ #define DATA 0x200 diff --git a/rtc/ds1306.c b/rtc/ds1306.c index e01e1ce..89e433d 100644 --- a/rtc/ds1306.c +++ b/rtc/ds1306.c @@ -36,7 +36,7 @@ #include <rtc.h> #include <spi.h> -#if defined(CONFIG_RTC_DS1306) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS1306) && defined(CONFIG_CMD_DATE) #define RTC_SECONDS 0x00 #define RTC_MINUTES 0x01 diff --git a/rtc/ds1307.c b/rtc/ds1307.c index 3b26a0a..c882d79 100644 --- a/rtc/ds1307.c +++ b/rtc/ds1307.c @@ -36,7 +36,7 @@ #include <i2c.h> #if (defined(CONFIG_RTC_DS1307) || defined(CONFIG_RTC_DS1338) ) && \ - (CONFIG_COMMANDS & CFG_CMD_DATE) + defined(CONFIG_CMD_DATE) /*---------------------------------------------------------------------*/ #undef DEBUG_RTC @@ -201,4 +201,4 @@ static unsigned char bin2bcd (unsigned int n) return (((n / 10) << 4) | (n % 10)); } -#endif /* (CONFIG_RTC_DS1307 || CONFIG_RTC_DS1338) && (CFG_COMMANDS & CFG_CMD_DATE) */ +#endif diff --git a/rtc/ds1337.c b/rtc/ds1337.c index 9f0c8c0..c636ac5 100644 --- a/rtc/ds1337.c +++ b/rtc/ds1337.c @@ -32,7 +32,7 @@ #include <rtc.h> #include <i2c.h> -#if defined(CONFIG_RTC_DS1337) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS1337) && defined(CONFIG_CMD_DATE) /*---------------------------------------------------------------------*/ #undef DEBUG_RTC @@ -188,4 +188,4 @@ static unsigned char bin2bcd (unsigned int n) return (((n / 10) << 4) | (n % 10)); } -#endif /* CONFIG_RTC_DS1337 && (CFG_COMMANDS & CFG_CMD_DATE) */ +#endif diff --git a/rtc/ds1374.c b/rtc/ds1374.c index 50a996c..e773dd9 100644 --- a/rtc/ds1374.c +++ b/rtc/ds1374.c @@ -35,7 +35,7 @@ #include <rtc.h> #include <i2c.h> -#if (defined(CONFIG_RTC_DS1374)) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if (defined(CONFIG_RTC_DS1374)) && defined(CONFIG_CMD_DATE) /*---------------------------------------------------------------------*/ #undef DEBUG_RTC @@ -250,4 +250,4 @@ static void rtc_write_raw (uchar reg, uchar val) { i2c_reg_write (CFG_I2C_RTC_ADDR, reg, val); } -#endif /* (CONFIG_RTC_DS1374) && (CFG_COMMANDS & CFG_CMD_DATE) */ +#endif diff --git a/rtc/ds1556.c b/rtc/ds1556.c index dd9ea5e..4365cfb 100644 --- a/rtc/ds1556.c +++ b/rtc/ds1556.c @@ -37,7 +37,7 @@ #include <rtc.h> -#if defined(CONFIG_RTC_DS1556) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS1556) && defined(CONFIG_CMD_DATE) static uchar rtc_read( unsigned int addr ); static void rtc_write( unsigned int addr, uchar val); @@ -203,4 +203,4 @@ static unsigned char bin2bcd (unsigned int n) return (((n / 10) << 4) | (n % 10)); } -#endif /* CONFIG_RTC_DS1556 && CFG_CMD_DATE */ +#endif diff --git a/rtc/ds164x.c b/rtc/ds164x.c index 3cc76ab..bff22b9 100644 --- a/rtc/ds164x.c +++ b/rtc/ds164x.c @@ -37,7 +37,7 @@ #include <rtc.h> -#if defined(CONFIG_RTC_DS164x) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS164x) && defined(CONFIG_CMD_DATE) static uchar rtc_read(unsigned int addr ); static void rtc_write(unsigned int addr, uchar val); @@ -197,4 +197,4 @@ static unsigned char bin2bcd (unsigned int n) return (((n / 10) << 4) | (n % 10)); } -#endif /* CONFIG_RTC_DS164x && CFG_CMD_DATE */ +#endif diff --git a/rtc/ds174x.c b/rtc/ds174x.c index 58b13e9..5f85a68 100644 --- a/rtc/ds174x.c +++ b/rtc/ds174x.c @@ -33,7 +33,7 @@ #include <command.h> #include <rtc.h> -#if defined(CONFIG_RTC_DS174x) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS174x) && defined(CONFIG_CMD_DATE) static uchar rtc_read( unsigned int addr ); static void rtc_write( unsigned int addr, uchar val); @@ -199,4 +199,4 @@ static unsigned char bin2bcd (unsigned int n) return (((n / 10) << 4) | (n % 10)); } -#endif /* CONFIG_RTC_MC146818 && CFG_CMD_DATE */ +#endif diff --git a/rtc/ds3231.c b/rtc/ds3231.c index 50aeeb5..fe11b86 100644 --- a/rtc/ds3231.c +++ b/rtc/ds3231.c @@ -33,7 +33,7 @@ #include <rtc.h> #include <i2c.h> -#if defined(CONFIG_RTC_DS3231) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS3231) && defined(CONFIG_CMD_DATE) /*---------------------------------------------------------------------*/ #undef DEBUG_RTC @@ -190,4 +190,4 @@ static unsigned char bin2bcd (unsigned int n) return (((n / 10) << 4) | (n % 10)); } -#endif /* (CONFIG_RTC_DS3231) && (CONFIG_COMMANDS & CFG_CMD_DATE) */ +#endif diff --git a/rtc/m41t11.c b/rtc/m41t11.c index c725cc9..81da33a 100644 --- a/rtc/m41t11.c +++ b/rtc/m41t11.c @@ -43,7 +43,7 @@ #endif */ -#if defined(CONFIG_RTC_M41T11) && defined(CFG_I2C_RTC_ADDR) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_M41T11) && defined(CFG_I2C_RTC_ADDR) && defined(CONFIG_CMD_DATE) static unsigned bcd2bin (uchar n) { @@ -199,4 +199,4 @@ int rtc_recall(int addr, unsigned char* data, int size) return i2c_read( CFG_I2C_RTC_ADDR, REG_CNT+addr, 1, data, size ); } -#endif /* CONFIG_RTC_M41T11 && CFG_I2C_RTC_ADDR && CFG_CMD_DATE */ +#endif diff --git a/rtc/m48t35ax.c b/rtc/m48t35ax.c index 6c38a53..0a0ffa8 100644 --- a/rtc/m48t35ax.c +++ b/rtc/m48t35ax.c @@ -33,7 +33,7 @@ #include <rtc.h> #include <config.h> -#if defined(CONFIG_RTC_M48T35A) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_M48T35A) && defined(CONFIG_CMD_DATE) static uchar rtc_read (uchar reg); static void rtc_write (uchar reg, uchar val); @@ -163,4 +163,4 @@ static unsigned char bin2bcd (unsigned int n) return (((n / 10) << 4) | (n % 10)); } -#endif /* CONFIG_RTC_M48T35A && CFG_CMD_DATE */ +#endif diff --git a/rtc/max6900.c b/rtc/max6900.c index 73919cd..c75a8e0 100644 --- a/rtc/max6900.c +++ b/rtc/max6900.c @@ -32,7 +32,7 @@ #include <rtc.h> #include <i2c.h> -#if defined(CONFIG_RTC_MAX6900) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_MAX6900) && defined(CONFIG_CMD_DATE) #ifndef CFG_I2C_RTC_ADDR #define CFG_I2C_RTC_ADDR 0x50 @@ -128,4 +128,4 @@ void rtc_reset (void) { } -#endif /* CONFIG_RTC_MAX6900 && CFG_CMD_DATE */ +#endif diff --git a/rtc/mc146818.c b/rtc/mc146818.c index 20b1b3e..ab377ed 100644 --- a/rtc/mc146818.c +++ b/rtc/mc146818.c @@ -31,7 +31,7 @@ #include <command.h> #include <rtc.h> -#if defined(CONFIG_RTC_MC146818) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_MC146818) && defined(CONFIG_CMD_DATE) static uchar rtc_read (uchar reg); static void rtc_write (uchar reg, uchar val); @@ -175,4 +175,4 @@ static unsigned char bin2bcd (unsigned int n) return (((n / 10) << 4) | (n % 10)); } -#endif /* CONFIG_RTC_MC146818 && CFG_CMD_DATE */ +#endif diff --git a/rtc/mk48t59.c b/rtc/mk48t59.c index 64f751f..bacdb5b 100644 --- a/rtc/mk48t59.c +++ b/rtc/mk48t59.c @@ -131,7 +131,7 @@ void nvram_write(short dest, const void *src, size_t count) rtc_write(d++, *s++); } -#if (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_CMD_DATE) /* ------------------------------------------------------------------------- */ @@ -233,5 +233,5 @@ void rtc_set_watchdog(short multi, short res) rtc_write(RTC_WATCHDOG, wd_value); } -#endif /* (CONFIG_COMMANDS & CFG_CMD_DATE) */ +#endif #endif /* CONFIG_RTC_MK48T59 */ diff --git a/rtc/mpc5xxx.c b/rtc/mpc5xxx.c index 2053df1..216386a 100644 --- a/rtc/mpc5xxx.c +++ b/rtc/mpc5xxx.c @@ -32,7 +32,7 @@ #include <command.h> #include <rtc.h> -#if defined(CONFIG_RTC_MPC5200) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_MPC5200) && defined(CONFIG_CMD_DATE) /***************************************************************************** * this structure should be defined in mpc5200.h ... @@ -137,4 +137,4 @@ void rtc_reset (void) return; /* nothing to do */ } -#endif /* CONFIG_RTC_MPC5200 && CFG_CMD_DATE */ +#endif diff --git a/rtc/mpc8xx.c b/rtc/mpc8xx.c index 830e56e..8d10c0e 100644 --- a/rtc/mpc8xx.c +++ b/rtc/mpc8xx.c @@ -31,7 +31,7 @@ #include <command.h> #include <rtc.h> -#if defined(CONFIG_RTC_MPC8xx) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_MPC8xx) && defined(CONFIG_CMD_DATE) /* ------------------------------------------------------------------------- */ @@ -70,6 +70,4 @@ void rtc_reset (void) return; /* nothing to do */ } -/* ------------------------------------------------------------------------- */ - -#endif /* CONFIG_RTC_MPC8xx && CFG_CMD_DATE */ +#endif diff --git a/rtc/pcf8563.c b/rtc/pcf8563.c index 05ae97e..2d73d5d 100644 --- a/rtc/pcf8563.c +++ b/rtc/pcf8563.c @@ -32,7 +32,7 @@ #include <rtc.h> #include <i2c.h> -#if defined(CONFIG_RTC_PCF8563) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_PCF8563) && defined(CONFIG_CMD_DATE) static uchar rtc_read (uchar reg); static void rtc_write (uchar reg, uchar val); @@ -141,4 +141,4 @@ static unsigned char bin2bcd (unsigned int n) return (((n / 10) << 4) | (n % 10)); } -#endif /* CONFIG_RTC_PCF8563 && CFG_CMD_DATE */ +#endif diff --git a/rtc/rs5c372.c b/rtc/rs5c372.c index b56808b..3d1346e 100644 --- a/rtc/rs5c372.c +++ b/rtc/rs5c372.c @@ -34,7 +34,7 @@ #include <rtc.h> #include <i2c.h> -#if defined(CONFIG_RTC_RS5C372A) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_RS5C372A) && defined(CONFIG_CMD_DATE) /* * Reads are always done starting with register 15, which requires some * jumping-through-hoops to access the data correctly. @@ -299,4 +299,4 @@ bin2bcd (unsigned int n) { return (((n / 10) << 4) | (n % 10)); } -#endif /* defined(CONFIG_RTC_RS5C372A) && (CONFIG_COMMANDS & CFG_CMD_DATE) */ +#endif diff --git a/rtc/s3c24x0_rtc.c b/rtc/s3c24x0_rtc.c index 9e2191e..7f8b4fa 100644 --- a/rtc/s3c24x0_rtc.c +++ b/rtc/s3c24x0_rtc.c @@ -28,7 +28,7 @@ #include <common.h> #include <command.h> -#if defined(CONFIG_RTC_S3C24X0) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_S3C24X0) && (defined(CONFIG_CMD_DATE)) #if defined(CONFIG_S3C2400) #include <s3c2400.h> @@ -175,6 +175,4 @@ void rtc_reset (void) rtc->RTCCON &= ~(0x08|0x01); } -/* ------------------------------------------------------------------------- */ - -#endif /* CONFIG_RTC_S3C24X0 && CFG_CMD_DATE */ +#endif |