Joerg Dorchain (firstname.lastname@example.org)
Fri, 28 Aug 1998 10:46:19 +0200 (MET DST)
> >+#if !defined(__sparc__) && !defined(__mc68000__)
> I wonder if there's any reason not to remove this #if altogether. We
> shouldn't do it for 2.2 now just in case it does break something, but it would
> be worth thinking about soon afterwards.
If my machine, I noticed the effect of losing characters without a
udelay(1). The counter is a bit ridiculous on an 68060 with does 2(!)
loops per clock cycle (my 50MHz CPU gives 99.53 bogomips). You would have
to set it to a huge value. Anyway, I am wondering why these charcters get
lost, because the handshake is done in hardware, and the busy line is
checked before sending the next character. IIRC, the old
m68k-printer-drivers doesn#t need a delay.
> Good point. That change probably could go in for 2.2 actually.
Well, IMHO we had some success in spreading the idea of different
byteorders, now we can do the same with different interrupt schemes
(shared vs. non-shared)
> >+ if (control & 0x10) /* XXX: What is INTEN? */
> That doesn't really belong in the control register; it's the interrupt enable.
There is an interrupt_enable function. Why not use that? It would make
the code easier to understand (well, for me at least).
> >+ if (control & 0x08) /* XXX: What is SELECP? */
> Just an output pin on the port.
It looked it up in the spec. On Amiga, it is hardwired to GND (if that
doesn't make sense, it could also be +5V)
> Select port mode (SPP, EPP, ECP, ...)
Hm, sounds PC-specific. I read some docs about the different PC-hardware.
To me it looks like only EPP could be emulated by Amiga-Hardware. Anyway,
I don't have enough understanding of this to go on to the next driver for
the MFCII-card (based on the MC6821-chip), which can do almost anything.
> Really? That may upset some code. Surely there must be some way to find if
> the port is generating an interrupt.
This is checked by the interrupt-dispatching code. It is a read-only
register which is cleared when reading, and I don't know if the value is
available outside amiints.c. But when the interrupt routine is called,
you can be sure that it originates from the right source. Hm, so better
change the return value to 1?
For the MFC card this is somewaht different. Because it is a plug-in
card, the system-irq-dispatcher doesn't know where the interrupt exactly
come from (it is irq level2, which is the same as the ide and the scsi
controller and most plug-in cards in amigas use, btw). So it calls a
handler chain, and each handler in the chain has to check wether it is
"his" interrupt, and if so, acknowledge it. For the MC6821 this is a
must, because otherwise the irq-line would stay active all the time,
generating one interrupt after another. Is the irq-handler set by
request_irq() the right place for such a function? I saw a place where it
is overwritten. Or do this in the examine_irq() function? In this case,
it has to be called for every interrupt of the card or the machine locks
-- To unsubscribe, send mail to: email@example.com --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:18:08 EST