linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RTC woes
@ 2008-02-19 16:34 Marc LeFevre
  2008-02-19 22:30 ` Clemens Koller
  0 siblings, 1 reply; 2+ messages in thread
From: Marc LeFevre @ 2008-02-19 16:34 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

Hi:

I'm new to the list.  I have an e500-based embedded Linux system running a
2.6.22 kernel.  I have a PCF8563T i2c based RTC chip attached to the PPC i2c
bus.  In my kernel config file I have selected CONFIG_RTC_INTF_DEV=y and
CONFIG_RTC_DRV_PCF8563=y.  I do a mknod  for /dev/rtc as c 10 135 (standard
Linux) and link /dev/rtc0 to it.

 

When I boot, get the following message:

 

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

 

and, of course I cannot access /dev/rtc after booting.  I can, however, talk
to the rtc if I use /dev/i2c and a generic i2c read and write utility.

 

When I look in /proc/devices, I see that rtc has taken major number 254
which puzzles me. RTC should not need a dynamic major number, right?  I have
perused the drivers in linux/drivers/rtc and don't find any of them calling
register_chrdev() to get a dynamic major number.  So here are my questions:

 

1)       Shouldn't rtc automagically use major/minor 10/135?

2)       How can I find where in the source it asks for a dynamic major
number?

3)       Does the PPC have some quirks regarding i2c operation that are at
the root of this problem?

 

BYW, I tried making the rtc device file as c 254 0 to match what's in
/proc/devices and that gives me the same bejavior.

 

Thanks in advance for any help you can offer.

 

Marc

 


[-- Attachment #2: Type: text/html, Size: 6488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RTC woes
  2008-02-19 16:34 RTC woes Marc LeFevre
@ 2008-02-19 22:30 ` Clemens Koller
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Koller @ 2008-02-19 22:30 UTC (permalink / raw)
  To: Marc LeFevre; +Cc: linuxppc-embedded

Marc LeFevre schrieb:
> I’m new to the list.

Welcome! :-)

 > I have an e500-based embedded Linux system running
> a 2.6.22 kernel.  I have a PCF8563T i2c based RTC chip attached to the 
> PPC i2c bus.  In my kernel config file I have selected 
> CONFIG_RTC_INTF_DEV=y and CONFIG_RTC_DRV_PCF8563=y.  I do a mknod  for 
> /dev/rtc as c 10 135 (standard Linux) and link /dev/rtc0 to it.
> 
  > When I boot, get the following message:
> 
> drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

2.6.22.x and 2.6.23.x i2c rtc code was quite messy around PCF8563.

> 3)       Does the PPC have some quirks regarding i2c operation that are 
> at the root of this problem?

The RTC subsystem was improved quite a bit lately. Try 2.6.24' powerpc
architecture with a proper device tree instead. It works over here on
mpc8540 / mpc8548 whereas the older ones were just a waste of time.

Regards,

Clemens

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-19 22:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-19 16:34 RTC woes Marc LeFevre
2008-02-19 22:30 ` Clemens Koller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).