linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michel Lanners <mlan@cpu.lu>
To: linuxppc-dev@lists.linuxppc.org
Subject: Problem in pmac PCI fixup
Date: Sun, 28 Apr 2002 17:25:30 +0200 (CEST)	[thread overview]
Message-ID: <E171qYc-0000AJ-00@piglet.grunz.lu> (raw)


Hi all,

I'm about to finish a bit of work on planb, the 7x00/8x00 video input
driver.

It's now in rather good shape (acording to my very low standards ;-);
among other things, it doesn't need to do any PCI fixups by hand
anymore.

Almost, I should add, because there's a problem left with the IRQ. In
fact, the PCI code does not fill pdev->irq for many pmac devices, since
OF doesn't set PCI_INTERRUPT_LINE. Therefore, we have fixup code in
pmac_pci.c; however, that code checks PCI_INTERRUPT_PIN on the device.

Now, the problem is that planb doesn't have a PCI_INTERRUPT_PIN setting,
therefore fixup doesn't get applied. And hardcoding the IRQ in the planb
driver code doesn't seem right....

Since the PCI fixup code is about fixing broken things anyway, I'd
propose we remove the check for PCI_INTERRUPT_PIN and solely rely on OF
properties to see whether there's an interrupt present at all. Patch
would be this here (hand-pasted):

--- linux-2.4.19-pre6-lvm-gentoo/arch/ppc/kernel/pmac_pci.c     Sun Apr 28 09:14:09 2002
+++ linux-2.4.16-planb/arch/ppc/kernel/pmac_pci.c       Sun Apr 28 17:18:39 2002
@@ -493,8 +503,6 @@
                unsigned char pin;
                struct device_node* node;

-               if (pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin) || !pin)
-                       continue; /* No interrupt generated -> no fixup */
                node = pci_device_to_OF_node(dev);
                if (!node) {
                        printk("No OF node for device %x:%x\n", dev->bus->number, dev->devfn >> 3);

Anybody have any problem with that approach?

Thanks, and cheers

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2002-04-28 15:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-28 15:25 Michel Lanners [this message]
2002-04-28 15:16 ` Problem in pmac PCI fixup Benjamin Herrenschmidt
2002-04-29 19:34   ` Michel Lanners

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E171qYc-0000AJ-00@piglet.grunz.lu \
    --to=mlan@cpu.lu \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).