[parisc-linux] EISA interrupts

Daniel Engstrom 5116@telia.com
Sun, 4 Nov 2001 00:41:09 +0100


--AWniW0JNca5xppdA
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit


On 2001.11.03 08:24 Matthew Wilcox wrote:
> 
> To get ISA/EISA interrupts working, I think we're going to need to
> program the 82357 ISP chip properly.  

Here is the first version of my patch. It gives me interrupts to my ISA
NE2000 clone.

In order to use an ISA card you will have to specify the IRQ as edge triggerd 
on the kernel command line options  eisa_irq_edge. 
Use eisa_irq_edge=9,10 to set IRQ 9 and 10 to edge mode.

The trig-mode of the irq lines could be read from the EEPROM on the system
board but I have not yet fully understood its format, so I solved it with a 
commandline option for now.

/Daniel

-- 

--AWniW0JNca5xppdA
Content-Type: application/octet-stream; charset=us-ascii
Content-Disposition: attachment; filename="diff-eisa-011103.patch"
Content-Transfer-Encoding: base64

SW5kZXg6IGRyaXZlcnMvZ3NjL2Vpc2EuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvdmFy
L2N2cy9saW51eC9kcml2ZXJzL2dzYy9laXNhLmMsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEu
NwpkaWZmIC11IC1wIC11IC1yMS43IGVpc2EuYwotLS0gZHJpdmVycy9nc2MvZWlzYS5jCTIw
MDEvMTAvMjMgMjE6MDI6NTQJMS43CisrKyBkcml2ZXJzL2dzYy9laXNhLmMJMjAwMS8xMS8w
MyAyMzoxMjo0MwpAQCAtMjcsNyArMjcsMTQgQEAKICNpbmNsdWRlIDxhc20vZ3NjLmg+CiAj
aW5jbHVkZSA8YXNtL2hhcmR3YXJlLmg+CiAjaW5jbHVkZSA8YXNtL3Byb2Nlc3Nvci5oPgor
I2luY2x1ZGUgPGFzbS9kZWxheS5oPgogCisjaWYgMAorI2RlZmluZSBFSVNBX0RCRyhtc2cs
IGFyZy4uLiApIHByaW50ayhLRV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yZWdpb24uYWN0aW9uW2lycV0sIEVJU0FfSVJRX1JFR0lPTiArIGlycSwgcmVncyk7
CisgICAKKyAgICAgICAgLyogdW5tYXNrICovCisgICAgICAgIGlmIChpcnEgJiA4KSB7CisJ
CXNsYXZlX21hc2sgJj0gfigxIDw8IChpcnEmNykpOworCQllaXNhX291dDgoc2xhdmVfbWFz
aywgMHhhMSk7CisJfSBlbHNlIHsKKwkJbWFzdGVyX21hc2sgJj0gfigxIDw8IChpcnEmNykp
OworCQllaXNhX291dDgobWFzdGVyX21hc2ssIDB4MjEpOworCX0KKworfQorCit2b2lkIGlu
aXRfZWlzYV9waWModm9pZCkKK3sKKyAgICAgICAgZWlzYV9vdXQ4KDB4ZmYsIDB4MjEpOyAv
KiBtYXNrIGR1cmluZyBpbml0ICovCisgICAgICAgIGVpc2Ffb3V0OCgweGZmLCAweGExKTsg
LyogbWFzayBkdXJpbmcgaW5pdCAqLworCQorICAgICAgICAvKiBtYXN0ZXIgcGljICovCisg
ICAgICAgIGVpc2Ffb3V0OCgweDExLDB4MjApOyAvKiBJQ1cxICovICAgCisgICAgICAgIGVp
c2Ffb3V0OCgweDAwLDB4MjEpOyAvKiBJQ1cyICovICAgCisgICAgICAgIGVpc2Ffb3V0OCgw
eDA0LDB4MjEpOyAvKiBJQ1czICovICAgCisgICAgICAgIGVpc2Ffb3V0OCgweDAxLDB4MjEp
OyAvKiBJQ1c0ICovICAgCisgICAgICAgIGVpc2Ffb3V0OCgweDQwLDB4MjApOyAvKiBPQ1cy
ICovICAgCisJCisgICAgICAgIC8qIHNsYXZlIHBpYyAqLworICAgICAgICBlaXNhX291dDgo
MHgxMSwweGEwKTsgLyogSUNXMSAqLyAgIAorICAgICAgICBlaXNhX291dDgoMHgwOCwweGEx
KTsgLyogSUNXMiAqLyAgIAorICAgICAgICBlaXNhX291dDgoMHgwMiwweGExKTsgLyogSUNX
MyAqLyAgIAorICAgICAgICBlaXNhX291dDgoMHgwMSwweGExKTsgLyogSUNXNCAqL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