[PARPORT] Re: L68K: Amiga-Parport-driver


Philip Blundell (pb@nexus.co.uk)
Fri, 28 Aug 1998 10:05:34 +0100


>> >+#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
>
>If my machine, I noticed the effect of losing characters without a
>udelay(1).

I actually meant we should probably use udelay() for all platforms, not just
SPARC and m68k.

>There is an interrupt_enable function. Why not use that? It would make
>the code easier to understand (well, for me at least).

Historical reasons. Yes it should be done that way really.

>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)

Fine. It's the same on `arc' hardware -- just ignore the control bit then.

>> Select port mode (SPP, EPP, ECP, ...)
>
>Hm, sounds PC-specific.

It's not, really. ECP and EPP are standard protocols.

>you can be sure that it originates from the right source. Hm, so better
>change the return value to 1?

That's probably better, yes.

>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.

Ah. The way parport interrupt handlers work at the moment, the high-level
driver (lp, etc) provides the handler function directly. The grot in
parport_share is there to switch the interrupt between different handlers.

Arguably a better way to do this would be to have the parport code claim the
interrupt directly, and just call the function for the appropriate driver.
Again this probably isn't a change for 2.2. I'm not quite sure where your
interrupt acknowledgement should fit in - probably in examine_irq() actually,
since the idea is that this function gets called to see if it's a parallel
port interrupt.

p.

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- 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