linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>
Cc: list linux-ide <linux-ide@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Subject: [PATCH] ppc32: Fix via IDE driver for pegasos
Date: Thu, 27 Jan 2005 13:13:54 +1100	[thread overview]
Message-ID: <1106792034.5235.89.camel@gaston> (raw)

Hi Andrew !

The Pegasos machines have the VIA IDE controller configured in a strange
way by the firmware. It claims to be fully native, but is actually
routed to legacy irqs 14 and 15.

This patch works around that in the driver. In the future, I'll try to
do an ifdef-less patch by detecting that setup from the chip, and using
the new pci_get_legacy_ide_irq() in that case, but I don't have proper
HW infos. This patch is good enough in the meantime, I'll come up with a
better one later eventually.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

--- kernel-source-2.6.8/drivers/ide/pci/via82cxxx.c.orig	2004-11-24 22:47:24.000000000 +0100
+++ kernel-source-2.6.8/drivers/ide/pci/via82cxxx.c	2004-12-26 12:10:06.900614568 +0100
@@ -36,6 +36,10 @@
 #include <linux/ide.h>
 #include <asm/io.h>
 
+#ifdef CONFIG_PPC_MULTIPLATFORM
+#include <asm/processor.h>
+#endif
+
 #include "ide-timing.h"
 
 #define DISPLAY_VIA_TIMINGS
@@ -584,6 +588,13 @@
 	hwif->tuneproc = &via82cxxx_tune_drive;
 	hwif->speedproc = &via_set_drive;
 
+
+#ifdef CONFIG_PPC_MULTIPLATFORM
+	if(_machine == _MACH_chrp && _chrp_type == _CHRP_Pegasos) {
+		hwif->irq = hwif->channel ? 15 : 14;
+	}
+#endif
+
 	for (i = 0; i < 2; i++) {
 		hwif->drives[i].io_32bit = 1;
 		hwif->drives[i].unmask = (via_config->flags & VIA_NO_UNMASK) ? 0 : 1;



                 reply	other threads:[~2005-01-27  2:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1106792034.5235.89.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=akpm@osdl.org \
    --cc=linux-ide@vger.kernel.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).