Loading ...
Sorry, an error occurred while loading the content.
 

NSLU2/Debian RTC

Expand Messages
  • Gordon Farquharson
    Hi I can t access my real-time clock on my slug. I am running NSLU2/Debian (testing): $ uname -a Linux venus 2.6.17-2-nslu2 #1 Thu Sep 14 23:54:15 UTC 2006
    Message 1 of 5 , Sep 25, 2006
      Hi

      I can't access my real-time clock on my slug. I am running NSLU2/Debian
      (testing):

      $ uname -a
      Linux venus 2.6.17-2-nslu2 #1 Thu Sep 14 23:54:15 UTC 2006 armv5tel GNU/Linux

      When I try to access the RTC using hwclock, I get

      $ hwclock --debug
      hwclock from util-linux-2.12r
      hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
      No usable clock interface found.
      Cannot access the Hardware Clock via any known method.

      which is expected since the device /dev/rtc does not exist. However, the same
      thing happens when I create it using

      $ mknod /dev/rtc c 10 135

      $ hwclock --debug
      hwclock from util-linux-2.12r
      hwclock: Open of /dev/rtc failed, errno=19: No such device.
      No usable clock interface found.
      Cannot access the Hardware Clock via any known method.

      I'm not sure if udev (and I haven't taken the time to figure out the clever
      magic that udev implements) is supposed to create the device.

      I am able to access the RTC through the i2c bus using

      $ i2cdump 0 0x6f i
      WARNING! This program can confuse your I2C bus, cause data loss and worse!
      I will probe file /dev/i2c-0, address 0x6f, mode i2c block
      Continue? [Y/n] y
      0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
      00: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      10: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      20: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      30: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      40: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      50: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      60: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      70: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      80: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      90: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      a0: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      b0: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      c0: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      d0: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      e0: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???
      f0: 54 27 a1 25 09 06 01 20 54 27 a1 25 09 06 01 20 T'?%??? T'?%???

      but the output seems odd to me. Firstly, the alarm registers of the X1205 seem
      to have the right time. How did it get the right time if the kernel is not able
      to access the RTC. I am running ntp, but this shouldn't make a difference.

      Secondly, I thought that addresses 0x00 to 0x07 were the alarm 0 registers, 0x08
      to 0x0F were the alarm 1 registers, 0x10 to 0x13 were the control registers, and
      0x30 to 0x3f were the rtc registers. However, unless I'm interpreting the memory
      dump incorrectly (or using i2cdump incorrectly), it looks like all of the
      registers contain copies of the alarm 0 and alarm 1 registers.

      Any help would be appreciated.

      Thanks.

      Gordon
    • chris_burghart
      Gordon, Do you have the x1226-rtc kernel module loaded? I believe it provides the clock interface you re looking for. Chris P.S. Greetings from upstairs... ...
      Message 2 of 5 , Sep 26, 2006
        Gordon,

        Do you have the x1226-rtc kernel module loaded?
        I believe it provides the clock interface you're looking
        for.

        Chris

        P.S. Greetings from upstairs...


        --- In nslu2-linux@yahoogroups.com, Gordon Farquharson
        <gordonfarquharson@...> wrote:
        >
        > Hi
        >
        > I can't access my real-time clock on my slug. I am running NSLU2/Debian
        > (testing):
        >
        > $ uname -a
        > Linux venus 2.6.17-2-nslu2 #1 Thu Sep 14 23:54:15 UTC 2006 armv5tel
        GNU/Linux
        >
        > When I try to access the RTC using hwclock, I get
        >
        > $ hwclock --debug
        > hwclock from util-linux-2.12r
        > hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
        > No usable clock interface found.
        > Cannot access the Hardware Clock via any known method.
        >
        > which is expected since the device /dev/rtc does not exist. However,
        the same
        > thing happens when I create it using
        >
        > $ mknod /dev/rtc c 10 135
        >
        > $ hwclock --debug
        > hwclock from util-linux-2.12r
        > hwclock: Open of /dev/rtc failed, errno=19: No such device.
        > No usable clock interface found.
        > Cannot access the Hardware Clock via any known method.
        >
        > I'm not sure if udev (and I haven't taken the time to figure out the
        clever
        > magic that udev implements) is supposed to create the device.
        >
        > I am able to access the RTC through the i2c bus using
        >
        > $ i2cdump 0 0x6f i
        > [...]
        >
        > Thanks.
        >
        > Gordon
        >
      • Laurent Gilson
        Hello, ... Hint: the right major/minor numbers can be found inside /sys/class/rtc-dev/rtc0/dev. Mine (3.10) wanted 254 0 . cu
        Message 3 of 5 , Sep 26, 2006
          Hello,

          > which is expected since the device /dev/rtc does not exist. However, the
          > same thing happens when I create it using ...

          Hint: the right major/minor numbers can be found inside
          /sys/class/rtc-dev/rtc0/dev. Mine (3.10) wanted "254 0".

          cu
        • Gordon Farquharson
          Hi Chris ... The rtc-x1205 driver is compiled into the Debian NSLU2 kernel, so it should work. It seems that udev doesn t create the device automagically, but
          Message 4 of 5 , Sep 28, 2006
            Hi Chris

            chris_burghart <burghart@...> writes:

            > > I can't access my real-time clock on my slug. I am running NSLU2/Debian
            > > (testing):

            > Do you have the x1226-rtc kernel module loaded?
            > I believe it provides the clock interface you're looking
            > for.

            The rtc-x1205 driver is compiled into the Debian NSLU2 kernel, so it should work.

            It seems that udev doesn't create the device automagically, but I haven't
            figured out why, when I create the device manually, I still can't access the
            rtc. I haven't had a chance to work on the problem since I sent the original
            email, because I've been away.

            > P.S. Greetings from upstairs...

            Actually, I'm somewhere on the east coast right now :-)

            Gordon
          • Gordon Farquharson
            ... Update: I found that adding rtc-x1205.probe=0,0x6f to the kernel boot options fixes the problem. I didn t need to change any udev rules. Gordon
            Message 5 of 5 , Oct 1 10:46 AM
              Gordon Farquharson <gordonfarquharson@...> writes:

              > I can't access my real-time clock on my slug. I am running NSLU2/Debian
              > (testing):
              >
              > $ uname -a
              > Linux venus 2.6.17-2-nslu2 #1 Thu Sep 14 23:54:15 UTC 2006 armv5tel GNU/Linux

              Update: I found that adding rtc-x1205.probe=0,0x6f to the kernel boot options
              fixes the problem. I didn't need to change any udev rules.

              Gordon
            Your message has been successfully submitted and would be delivered to recipients shortly.