linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-ide@vger.kernel.org,
	Roderick Colenbrander <thunderbird2k@gmail.com>,
	linuxppc-dev@ozlabs.org
Subject: Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems
Date: Fri, 17 Apr 2009 20:17:18 +0200	[thread overview]
Message-ID: <200904172017.18486.bzolnier@gmail.com> (raw)
In-Reply-To: <1239986984.7210.9.camel@pasglop>

On Friday 17 April 2009 18:49:44 Benjamin Herrenschmidt wrote:
> > But they don't. On MPC8610HPCD we have IDE interrupt directly
> > connected to the MPIC line (through PCI sideband interrupt), and
> > i8259 is _completely_ disabled in the bridge.
> 
> Hrm why did you do that ? :-)
> 
> Just kidding... if what you want is the PCI interrupt, then it should
> be in native mode, not legacy mode... Maybe the driver can figure out
> how the chip is configured by reading said configuration and use
> either the legacy interrupts or the PCI one...
> 
> > See this commit:
> > 
> >   commit 6d1cee44361b8d06ccd1812e80448d86ae60dfe3
> >   Author: Anton Vorontsov <avorontsov@ru.mvista.com>
> >   Date:   Tue Apr 29 22:57:38 2008 +0200
> >   
> >       alim15x3: disable init_hwif_ali15x3 for PowerPC
> > 
> > > Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > 
> > If the patch applied, MPC8610HPCD will be broken.
> > 
> > We need at least some machine_is() check.
> 
> That sucks. That's an endless problems with IDE and those on-board
> chipsets though. The interrupts should pretty much -always- be provided
> by the arch code, but for some reason, that got removed in favor of
> various hacks in the drivers themselves...

Previous PPC IRQ hacks combined with IDE IRQ hacks were a real nightmare
from maintenance perspective -- one could just never tell what is going
on and whether it is correct.

IDE host driver specific hacks were just a necessary temporary step into
solving this problem and most of them got removed in this merge window
during more general rework of IRQ setup code.

Nowadays IDE PCI layer just consistently uses arch specific (+ non-IDE
specific so libata gets benefits too) pci_get_legacy_ide_irq() helper
for legacy IRQs, please see ide_pci_init_one():

...
        /* fixup IRQ */
        if (ide_pci_is_in_compatibility_mode(dev)) {
                hw[0].irq = pci_get_legacy_ide_irq(dev, 0);
                hw[1].irq = pci_get_legacy_ide_irq(dev, 1);
        } else
                hw[1].irq = hw[0].irq = ret;
...

That's all!  No PPC-specific IRQ overrides, IDE-specific IRQ overrides
and IDE host driver ones needed! :)

There is still some legacy code (like the one in alim15x3 host driver)
needing fixing but the infrastructure allowing it should be all there.

Hmm, it looks like this historical IRQ override in init_hwif_ali15x3():

        if (dev->device == PCI_DEVICE_ID_AL_M5229)
                hwif->irq = hwif->channel ? 15 : 14;

should be just removed nowadays.

Seems like this should allow MPC8610HPCD to work with Roderick's patch
if the IDE controller is set to native mode and ALI south-bridge SIRQ
tables are correctly set (or if this is not ALI's south-bridge).  Anton?

Thanks,
Bart

  reply	other threads:[~2009-04-17 18:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c8485d470904150202s1f5c8cd7p34f0eaf4872f3e17@mail.gmail.com>
     [not found] ` <c8485d470904150734s47ce0f27y3ae984355e823d9f@mail.gmail.com>
2009-04-16 19:30   ` RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems Bartlomiej Zolnierkiewicz
2009-04-16 20:16     ` Grant Likely
2009-04-16 20:57     ` Anton Vorontsov
2009-04-16 21:27       ` Roderick Colenbrander
2009-04-16 22:04         ` Anton Vorontsov
2009-04-17  7:16           ` Roderick Colenbrander
2009-04-17  7:40     ` Benjamin Herrenschmidt
2009-04-17 12:40       ` Anton Vorontsov
2009-04-17 16:49         ` Benjamin Herrenschmidt
2009-04-17 18:17           ` Bartlomiej Zolnierkiewicz [this message]
2009-04-17 18:23             ` Anton Vorontsov
     [not found]               ` <c8485d470904270146g7b7204eckc58cd57449a41f45@mail.gmail.com>
2009-04-27 18:47                 ` [PATCH] alim15x3: Remove historical hacks, re-enable init_hwif for PowerPC Anton Vorontsov
2009-04-30 16:39                   ` Bartlomiej Zolnierkiewicz

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=200904172017.18486.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=thunderbird2k@gmail.com \
    /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).