Subject: Re: Success: -current on JavaStation1
To: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
From: Pete Zaitcev <zaitcev@metabyte.com>
List: port-sparc
Date: 08/21/2000 10:15:05
> Date: Mon, 21 Aug 2000 15:49:33 +0400
> From: "Valeriy E. Ushakov" <uwe@ptc.spbu.ru>
> From recent threads about "WTF" :-) with the keyboard I gather that
> PS/2 keyboard is not supported at all, right?
I communicated with PK about the keyboard and I think he understands
all the issues. It is only a matter of coding. The only small problem
is that MrCoffee PROM 2.x does not have any nodes for keyboard/mouse.
Therefore we must hardcode the address, e.g. this is what Linux does:
len = prom_getproperty(prom_root_node, "name", prop, sizeof(prop));
if (strncmp(prop, "SUNW,JavaStation-1", len) == 0) {
pcikbd_mrcoffee = 1; /* Brain damage detected */
goto found;
}
...................
if (pcikbd_mrcoffee) {
pcikbd_iobase = (unsigned long) ioremap(0x71300060, 8);
pcikbd_irq = 13 | 0x20;
if (request_irq(pcikbd_irq, &pcikbd_interrupt,
SA_SHIRQ, "keyboard", (void *)pcikbd_iobase)) {
printk("8042: cannot register IRQ %x\n", pcikbd_irq);
return;
}
printk("8042(kbd): iobase[%x] irq[%x]\n",
(unsigned)pcikbd_iobase, pcikbd_irq);
} else {
...................
As you can see, base address 0x71300060 and interrupt number 13
must be hardcoded (in *BSD case perhaps assigned in CONFIG file).
Other nastiness is that serial I/O and keyboard share the physical
interrupt pin in such a way that deasserting signal OUT2 in the
serial causes an interrupt flood. OUT2 must be '1' at all times.
All systems that I know assert OUT2 on open() and deassert it on
close(), which must be changed.
>[...]
> Xsun starts and X clients can display, but no input. Upon X startup
> driver says:
>
> Aug 20 21:48:11 brick /netbsd: kbd0: reset failed
>
> and assumes it talks to Type2 (dev/sun/kbd.c).
On Linux, X opens /dev/mouse and /dev/kbd which are not cooked
in any significant way, e.g. no VUID as on SunOS. Dunno if NetBSD
has it this way or do you virtualize input sources. If the latter,
some sort of an adapter must be taken from x86 port.
Good luck and do IIep support sooner!
--Pete