On Sat, 1 May 2010 21:18:38 +0200 "Dr. H. Nikolaus Schaller" <h...@computer.org> wrote:
> By looking into source file: this means > rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE) returns NULL. > CONFIG_RTC_HCTOSYS_DEVICE is "rtc0". The "normal" or standard devices you should get with udev are: lrwxrwxrwx 1 root root 4 2010-05-01 07:29 /dev/rtc -> rtc0 crw-rw---- 1 root root 254, 0 2010-05-01 07:29 /dev/rtc0 assuming you have the actual device driver(s) loaded. So I think there are two possibilities for the rtc0 device not showing up: 1) the i2c dependency is not being met, or 2) maybe udev is having trouble creating the device. > > $ fgrep RTC .config > # CONFIG_RTC is not set > CONFIG_RTC_PCF8563=y > # CONFIG_RTC_JZ is not set > CONFIG_RTC_LIB=y > CONFIG_RTC_CLASS=y > CONFIG_RTC_HCTOSYS=y > CONFIG_RTC_HCTOSYS_DEVICE="rtc0" > # CONFIG_RTC_DEBUG is not set > # RTC interfaces > CONFIG_RTC_INTF_SYSFS=y > # CONFIG_RTC_INTF_PROC is not set > CONFIG_RTC_INTF_DEV=y > # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set > # CONFIG_RTC_DRV_TEST is not set > # I2C RTC drivers > # CONFIG_RTC_DRV_DS1307 is not set > # CONFIG_RTC_DRV_DS1374 is not set > # CONFIG_RTC_DRV_DS1672 is not set > # CONFIG_RTC_DRV_MAX6900 is not set > # CONFIG_RTC_DRV_RS5C372 is not set > # CONFIG_RTC_DRV_ISL1208 is not set > # CONFIG_RTC_DRV_X1205 is not set > # CONFIG_RTC_DRV_PCF8563 is not set > CONFIG_RTC_DRV_PCF8583=y > # CONFIG_RTC_DRV_M41T80 is not set > # SPI RTC drivers > # Platform RTC drivers > # CONFIG_RTC_DRV_CMOS is not set > # CONFIG_RTC_DRV_DS1553 is not set > # CONFIG_RTC_DRV_STK17TA8 is not set > # CONFIG_RTC_DRV_DS1742 is not set > # CONFIG_RTC_DRV_M48T86 is not set > # CONFIG_RTC_DRV_M48T59 is not set > # CONFIG_RTC_DRV_V3020 is not set > # on-CPU RTC drivers > > Hm. Finally I had an idea: > > $ find /sys -name '*rtc*' > /sys/class/misc/rtc > /sys/class/rtc > /sys/module/rtc_pcf8583 > > So it may be as simple as changing > > CONFIG_RTC_HCTOSYS_DEVICE="rtc0" > > to > > CONFIG_RTC_HCTOSYS_DEVICE="rtc" It looks like you have two Phillips drivers enabled; I would disable one of them. Have you tried the RTC_JZ driver yet? Or is it just a stub? In general, I think the rtc0 device stuff in dmesg really depends on what gets created under /dev rather than what you see under /sys. If the right device appears in /sys then you should get something under /dev (with an appropriate udev rule). And by old and new rtc drivers I meant the (old) ones under: Device Drivers ---> Character devices ---> Enhanced Real Time Clock Support (legacy PC RTC driver) Generic /dev/rtc emulation ... HPET Timer <= this one works with both ... vs. the ones under: Device Drivers ---> Real Time Clock ---> /sys/class/rtc/rtcN (sysfs) /proc/driver/rtc (procfs for rtc0) /dev/rtcN (character devices) ... The first two options under the (old) Char device section only appear if the (newer) Real Time Clock section is disabled. There are lots of device-specific drivers in the latter section (including the Phillips drivers) but not the JZ driver (at least in the vanilla kernel). Question: does RTC_JZ appear under the bottom section "on-CPU RTC drivers"? It looks to me like your "CONFIG_RTC_PCF8563=y" is an older driver, while the newer one is dsiabled (along with the RTC_JZ driver). What happens if you disable the first one and enable the second one? What happens if you enable "CONFIG_RTC_DRV_PCF8563" instead? My $.02 would be to make sure the (old) ones are disabled and only enable stuff under the new Real Time Clock section. Not sure about HPET in this context; I guess you can try it both ways and see... Here's what I get on an embedded powerpc board with an older 2.6.15 kernel and udev-079-r1 install: lrwxrwxrwx 1 root root 8 Apr 18 13:15 /dev/rtc -> misc/rtc so I guess the version of the kernel and/or udev is old enough that it doesn't even create the rtc0 device (or a symlink). Do you see anything under /sys/devices like this: /sys/devices/pnp0/00:05/rtc /sys/devices/pnp0/00:05/rtc/rtc0 On the above embedded board I only see this: /sys/class/misc/rtc Anyway, hope this helps somehow... Steve _______________________________________________ Mipsbook-devel mailing list Mipsbook-devel@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/mipsbook-devel