#include <rtc.h>
#include <i2c.h>
-#if defined(CONFIG_RTC_M41T60) && defined(CFG_I2C_RTC_ADDR) && \
- defined(CONFIG_CMD_DATE)
+#if defined(CFG_I2C_RTC_ADDR) && defined(CONFIG_CMD_DATE)
static unsigned bcd2bin(uchar n)
{
if (l <= 0x3F) {
if ((data[RTC_CTRL] & 0x3F) != l) {
- printf("Setting RTC calibration to 0x%02X\n",
+ printf("Setting RTC calibration to 0x%02lX\n",
l);
data[RTC_CTRL] &= 0xC0;
data[RTC_CTRL] |= (uchar) l;