From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ns1.cypress.com (ns1.cypress.com [157.95.67.4]) by ozlabs.org (Postfix) with ESMTP id 92B13DDF31 for ; Wed, 20 Feb 2008 03:40:41 +1100 (EST) Received: from corpmail.cypress.com (corpmail [157.95.1.2]) by ns1.cypress.com (8.12.10/8.12.10) with ESMTP id m1JGUHOJ004986 for ; Tue, 19 Feb 2008 08:30:17 -0800 (PST) Received: from mailhost.isd.cypress.com (mailhost.isd.cypress.com [172.19.2.11]) by corpmail.cypress.com (8.12.10/8.12.10) with ESMTP id m1JGZ79p029544 for ; Tue, 19 Feb 2008 08:35:07 -0800 (PST) Received: from lfxvmxp (lfxvmxp.isd.cypress.com [172.19.2.243]) by mailhost.isd.cypress.com (8.12.2/8.12.2) with ESMTP id m1JGYvvm001500 for ; Tue, 19 Feb 2008 09:34:58 -0700 (MST) From: "Marc LeFevre" To: Subject: RTC woes Date: Tue, 19 Feb 2008 09:34:52 -0700 Message-ID: <06cb01c87315$5dad6010$f30213ac@isd.cypress.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_06CC_01C872DA.B14E8810" List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. ------=_NextPart_000_06CC_01C872DA.B14E8810 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_06CC_01C872DA.B14E8810 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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=3Dy and CONFIG_RTC_DRV_PCF8563=3Dy.  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

 

------=_NextPart_000_06CC_01C872DA.B14E8810--