Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* /dev/rtc on Jensen?
@ 1996-05-08  9:30 Nils Faerber
  0 siblings, 0 replies; 3+ messages in thread
From: Nils Faerber @ 1996-05-08  9:30 UTC (permalink / raw)


Hi folks!
Yesterday night I tested the new RTC device on my Jensen and crashed the
system's clock completely so that I had to hard-reset (power cycle) the
machine.
 So my question is: Is /dev/rtc supposed to work on Jensen?
I tested it with the demo application from the Linux source tree.
CU
  nils

-- 
Nils Faerber (Linux Nils)        eMail: nils@vespa.unix-ag.uni-siegen.de
Student of computer science      http://www.unix-ag.uni-siegen.de/~nils/
Unix user group, University of Siegen, Germany

Siegen ... the arctic rain forest!

--

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

* Re: /dev/rtc on Jensen?
       [not found] <199605080930.LAA09051@vespa.unix-ag.uni-siegen.de>
@ 1996-05-08 14:41 ` Linus Torvalds
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 1996-05-08 14:41 UTC (permalink / raw)


On Wed, 8 May 1996, Nils Faerber wrote:
> 
> Hi folks!
> Yesterday night I tested the new RTC device on my Jensen and crashed the
> system's clock completely so that I had to hard-reset (power cycle) the
> machine.
>  So my question is: Is /dev/rtc supposed to work on Jensen?

I guess we can say "supposed to", but not too surprising that it doesn't work
quite right. The Jensen RTC is kind of strange - it's the same as a normal
PC, except it's at the wrong address! (The whole Jensen IO subsystem is
rather strange - DEC was just learning how to do it, and it looks like they
also had some other strangeness going on with the Jensen)

You would probably get it to work by changing RTC_IO_BASE in rtc.c from 
0x70 to 0x170 for the Jensen, but in fact you might be better off using 
the "RTC_PORT()" define (change the RTC_IO_BASE define to be

	#define RTC_IO_BASE	RTC_PORT(0)

and everything wshould be ok even on non_jensen setups - this is that the 
kernel time init stuff uses.

Paul, you might take note of this (your comments at the RTC_IO_BASE thing 
say something along "can't see this changing soon", but you didn't take 
into account the strange and wonderful things when non-x86 people start 
playing with the ISA bus..)

		Linus

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

* Re: /dev/rtc on Jensen?
       [not found] <Pine.LNX.3.91.960508173336.27170C-100000@linux.cs.Helsinki.FI>
@ 1996-05-08 16:12 ` Paul Gortmaker
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Gortmaker @ 1996-05-08 16:12 UTC (permalink / raw)


From "Linus Torvalds" at May 8, 96 05:41:44 pm

> On Wed, 8 May 1996, Nils Faerber wrote:
> > 
> > Hi folks!
> > Yesterday night I tested the new RTC device on my Jensen and crashed the
> > system's clock completely so that I had to hard-reset (power cycle) the
> > machine.

It would be good to know where it dies, e.g. at boot, or while doing a
"cat /proc/rtc" or while running the example/test program.

> You would probably get it to work by changing RTC_IO_BASE in rtc.c from 
> 0x70 to 0x170 for the Jensen, but in fact you might be better off using 
> the "RTC_PORT()" define (change the RTC_IO_BASE define to be
> 
> 	#define RTC_IO_BASE	RTC_PORT(0)

There has to be more to it than that. The RTC_IO_BASE is only used for
the request_region() call. (yes, it should use RTC_PORT(0) as well...)
All of the access to the RTC hardware is done via CMOS_READ() and 
CMOS_WRITE() which use the RTC_PORT() macro, and thus should get the 0x170
address. (The rtc driver includes <linux/mc146818.h> which grabs <asm/io.h>
which should in turn grab <asm-alpha/jensen.h> finally.) Just in case it
doesn't, you can verify the base address with the following change:

-printk("Real Time Clock Driver v%s\n", RTC_VERSION);
+printk("Real Time Clock Driver v%s at i/o %#3x\n", RTC_VERSION, RTC_PORT(0));

> Paul, you might take note of this (your comments at the RTC_IO_BASE thing 
> say something along "can't see this changing soon", but you didn't take 
> into account the strange and wonderful things when non-x86 people start 
> playing with the ISA bus..)

I've tried to keep Alpha machines in mind when doing driver work. After
all, I made all the 8390 net drivers "Alpha Compatible" quite a long time
ago, which has to count for something...

Please CC any replies to me, as I am not on axp-list@redhat.com, nor do
I own an AXP, but I would like to try and fix this regardless.

Thanks,
Paul.

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

end of thread, other threads:[~1996-05-08 16:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-05-08  9:30 /dev/rtc on Jensen? Nils Faerber
     [not found] <199605080930.LAA09051@vespa.unix-ag.uni-siegen.de>
1996-05-08 14:41 ` Linus Torvalds
     [not found] <Pine.LNX.3.91.960508173336.27170C-100000@linux.cs.Helsinki.FI>
1996-05-08 16:12 ` Paul Gortmaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox