Re: [PATCH] add support for ST M41T94 SPI RTC (patch rev. 3)

From: Bosko Radivojevic
Date: Wed Oct 01 2008 - 08:51:48 EST


[ I sent a few private messages to Kim, but I'll sumarize my problem here ]

Hi all,

I have AT91SAM9260-based board, kernel is 2.6.26.3. M41T94 is
connected on SPI channel 1, chip select 0. I've applied Kim's patch
and added SPI device in board-sam9260ek.c:
#if defined(CONFIG_RTC_DRV_M41T94) || defined(CONFIG_RTC_DRV_M41T94_MODULE)
{ /* External RTC */
.modalias = "rtc-m41t94",
.chip_select = 0,
.max_speed_hz = 2 * 1000 * 1000,
.bus_num = 1,
},
#endif

During booting up everything seems fine (M41T94 is found etc), but it
is not working. Here is some output:

rtc-m41t94: dev (254:0)
rtc-m41t94 spi1.0: rtc core: registered rtc-m41t94 as rtc0
rtc-m41t94 spi1.0: read secs=0, mins=0, hours=0, mday=0, mon=-1,
year=100, wday=-1
rtc-m41t94 spi1.0: hctosys: unable to read the hardware clock
[..]
# hwclock -r;dmesg
hwclock: RTC_RD_TIME: Invalid argument
rtc-m41t94 spi1.0: read secs=0, mins=0, hours=0, mday=0, mon=-1,
year=100, wday=-1

#hwclock -w;dmesg
rtc-m41t94 spi1.0: write secs=15, mins=0, hours=0, mday=1, mon=0,
year=70, wday=4

I've tried both SPIMODE0 and SPIMODE3 (according to m41t94 datasheet)
but no improvements.

Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/