linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linuxppc-dev@ozlabs.org,
	Roderick Colenbrander <thunderbird2k@gmail.com>,
	linux-ide@vger.kernel.org
Subject: [PATCH] alim15x3: Remove historical hacks, re-enable init_hwif for PowerPC
Date: Mon, 27 Apr 2009 22:47:42 +0400	[thread overview]
Message-ID: <20090427184742.GA6435@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <c8485d470904270146g7b7204eckc58cd57449a41f45@mail.gmail.com>

Some time ago we had to disable init_hwif callback for PowerPC builds.
That was because of a historical IRQ overwrite in the driver, which
was causing IDE malfunction on the MPC8610HPCD PowerPC boards.

It's unclear whether this overwrite is still useful, but it is proven
to cause a bit of harm, and today some PowerPC targets (Xilinx ML510,
as reported by Roderick Colenbrander) need the init_hwif, so we have
to re-enable it and remove the overwrite.

Reported-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Suggested-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---

On Mon, Apr 27, 2009 at 10:46:25AM +0200, Roderick Colenbrander wrote:
> >> 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?
> >
> > OK, I'll test this approach.
> >
> 
> Did this approach work for you?

I'm sorry for the delay. Yes, it seem to work.

 drivers/ide/alim15x3.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
index 537da1c..e59b6de 100644
--- a/drivers/ide/alim15x3.c
+++ b/drivers/ide/alim15x3.c
@@ -402,27 +402,23 @@ static u8 ali_cable_detect(ide_hwif_t *hwif)
 	return cbl;
 }
 
-#if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC)
+#ifndef CONFIG_SPARC64
 /**
  *	init_hwif_ali15x3	-	Initialize the ALI IDE x86 stuff
  *	@hwif: interface to configure
  *
  *	Obtain the IRQ tables for an ALi based IDE solution on the PC
  *	class platforms. This part of the code isn't applicable to the
- *	Sparc and PowerPC systems.
+ *	Sparc systems.
  */
 
 static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
 {
-	struct pci_dev *dev = to_pci_dev(hwif->dev);
 	u8 ideic, inmir;
 	s8 irq_routing_table[] = { -1,  9, 3, 10, 4,  5, 7,  6,
 				      1, 11, 0, 12, 0, 14, 0, 15 };
 	int irq = -1;
 
-	if (dev->device == PCI_DEVICE_ID_AL_M5229)
-		hwif->irq = hwif->channel ? 15 : 14;
-
 	if (isa_dev) {
 		/*
 		 * read IDE interface control
@@ -455,7 +451,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
 }
 #else
 #define init_hwif_ali15x3 NULL
-#endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */
+#endif /* CONFIG_SPARC64 */
 
 /**
  *	init_dma_ali15x3	-	set up DMA on ALi15x3
-- 
1.6.2.2

  parent reply	other threads:[~2009-04-27 18:47 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
2009-04-17 18:23             ` Anton Vorontsov
     [not found]               ` <c8485d470904270146g7b7204eckc58cd57449a41f45@mail.gmail.com>
2009-04-27 18:47                 ` Anton Vorontsov [this message]
2009-04-30 16:39                   ` [PATCH] alim15x3: Remove historical hacks, re-enable init_hwif for PowerPC 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=20090427184742.GA6435@oksana.dev.rtsoft.ru \
    --to=avorontsov@ru.mvista.com \
    --cc=bzolnier@gmail.com \
    --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).