* Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
@ 2009-01-12 23:39 Gerhard Pircher
2009-01-13 5:02 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 11+ messages in thread
From: Gerhard Pircher @ 2009-01-12 23:39 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz, Benjamin Herrenschmidt; +Cc: linuxppc-dev, linux-ide
-------- Original-Nachricht --------
> Datum: Mon, 12 Jan 2009 18:55:55 +0100
> Von: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> An: "Gerhard Pircher" <gerhard_pircher@gmx.net>
> CC: linux-ide@vger.kernel.org, linuxppc-dev@ozlabs.org, grant.likely@secretlab.ca
> Betreff: Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
> > > checking if IDE_HFLAG_FORCE_LEGACY_IRQS should be set.
> > Wouldn't it be better, if I clean this up now? (I have to resend my
> > AmigaOne platform patches anyway).
>
> Replacement patch instead of incremental one is also fine with me -- given
> that it can wait for 2.6.30.
Yes, it can wait.
Although I would like to know from the powerpc maintainer, if my platform
patches could still go in 2.6.29, if I resend them in the next days? I guess it's
too late, right?
> > Okay, so the change shouldn't break IDE for Pegasos machines (I don't
> > have a Pegasos for testing).
>
> Yes but there may be some other platforms (not necessarily powerpc ones)
> that may be affected (i.e. they can depend indirectly on IRQ auto-probing
> during IDE probe) so cleanup patch needs to spend some time in linux-next.
I think the VIA libata driver simply checks the progif register, too. I guess you
don't like the idea of a "#ifdef PPC32" or so around the
ide_pci_is_in_compatibility_mode() check?
Thanks!
Gerhard
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
2009-01-12 23:39 [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards Gerhard Pircher
@ 2009-01-13 5:02 ` Benjamin Herrenschmidt
2009-01-13 12:33 ` Gerhard Pircher
0 siblings, 1 reply; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2009-01-13 5:02 UTC (permalink / raw)
To: Gerhard Pircher; +Cc: linuxppc-dev, Bartlomiej Zolnierkiewicz, linux-ide
> Yes, it can wait.
> Although I would like to know from the powerpc maintainer, if my platform
> patches could still go in 2.6.29, if I resend them in the next days? I guess it's
> too late, right?
Yes it is. I'll put them in -next after -rc2 or later, when we are happy
with them. That gives us a bit of time to do extra polishing.
Ben.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
2009-01-13 5:02 ` Benjamin Herrenschmidt
@ 2009-01-13 12:33 ` Gerhard Pircher
2009-01-19 18:28 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 11+ messages in thread
From: Gerhard Pircher @ 2009-01-13 12:33 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linux-ide, bzolnier, linuxppc-dev
-------- Original-Nachricht --------
> Datum: Tue, 13 Jan 2009 16:02:38 +1100
> Von: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> An: Gerhard Pircher <gerhard_pircher@gmx.net>
> CC: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>, grant.likely@secretlab.ca, linuxppc-dev@ozlabs.org, linux-ide@vger.kernel.org
> Betreff: Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
> > Yes, it can wait.
> > Although I would like to know from the powerpc maintainer, if my
> > platform patches could still go in 2.6.29, if I resend them in the next days? I
> > guess it's too late, right?
>
> Yes it is. I'll put them in -next after -rc2 or later, when we are happy
> with them. That gives us a bit of time to do extra polishing.
Good, then I'll send out a new patch for the IDE driver and the current one
can be reverted.
Gerhard
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
2009-01-13 12:33 ` Gerhard Pircher
@ 2009-01-19 18:28 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-01-19 18:28 UTC (permalink / raw)
To: Gerhard Pircher; +Cc: linuxppc-dev, linux-ide
On Tuesday 13 January 2009, Gerhard Pircher wrote:
>
> -------- Original-Nachricht --------
> > Datum: Tue, 13 Jan 2009 16:02:38 +1100
> > Von: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > An: Gerhard Pircher <gerhard_pircher@gmx.net>
> > CC: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>, grant.likely@secretlab.ca, linuxppc-dev@ozlabs.org, linux-ide@vger.kernel.org
> > Betreff: Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
>
> > > Yes, it can wait.
> > > Although I would like to know from the powerpc maintainer, if my
> > > platform patches could still go in 2.6.29, if I resend them in the next days? I
> > > guess it's too late, right?
> >
> > Yes it is. I'll put them in -next after -rc2 or later, when we are happy
> > with them. That gives us a bit of time to do extra polishing.
> Good, then I'll send out a new patch for the IDE driver and the current one
> can be reverted.
The following patchset fixes core IDE PCI code to always use
pci_get_legacy_ide_irq() and ide_pci_is_in_compatibility_mode():
http://lkml.org/lkml/2009/1/19/163
so via82cxxx specific solution is no longer necessary.
[ IOW I'll keep your previous patch and the #ifdef issue will
solve itself after the above patchset is merged. ]
Thanks,
Bart
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <3a68e478a75.2662f91@smtp.lizzy.com.au>]
* Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
[not found] <3a68e478a75.2662f91@smtp.lizzy.com.au>
@ 2009-01-20 11:25 ` Gerhard Pircher
0 siblings, 0 replies; 11+ messages in thread
From: Gerhard Pircher @ 2009-01-20 11:25 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linuxppc-dev, linux-ide
-------- Original-Nachricht --------
> Datum: Mon, 19 Jan 2009 19:28:35 +0100
> Von: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> An: "Gerhard Pircher" <gerhard_pircher@gmx.net>
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>, linux-ide@vger.kernel.org, linuxppc-dev@ozlabs.org, grant.likely@secretlab.ca
> Betreff: Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
> The following patchset fixes core IDE PCI code to always use
> pci_get_legacy_ide_irq() and ide_pci_is_in_compatibility_mode():
>
> http://lkml.org/lkml/2009/1/19/163
>
> so via82cxxx specific solution is no longer necessary.
>
> [ IOW I'll keep your previous patch and the #ifdef issue will
> solve itself after the above patchset is merged. ]
Thanks a lot! That's much better than the simple fix I had planned.
Gerhard
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/5] powerpc: Add platform support for AmigaOne
@ 2009-01-07 13:54 Gerhard Pircher
2009-01-07 14:12 ` [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards Gerhard Pircher
0 siblings, 1 reply; 11+ messages in thread
From: Gerhard Pircher @ 2009-01-07 13:54 UTC (permalink / raw)
To: linuxppc-dev
This commit adds the setup code for booting Linux on AmigaOne G3SE (G3
only), AmigaOne XE and uA1 (G3/G4) desktop computers. These boards were
sold by Eyetech and are based on MAI Logic's Teron boards and its
Articia S northbridge.
The AmigaOne uses U-boot as firmware, which doesn't support a flattened
device tree yet. The northbridge has some design flaws, which makes it
necessary to use non cacheable memory for DMA operations
(CONFIG_NOT_COHERENT_CACHE) and to avoid setting the coherence (M) flag
for memory pages.
Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
---
arch/powerpc/platforms/Kconfig | 1 +
arch/powerpc/platforms/Makefile | 1 +
arch/powerpc/platforms/amigaone/Kconfig | 18 +++
arch/powerpc/platforms/amigaone/Makefile | 1 +
arch/powerpc/platforms/amigaone/setup.c | 197 ++++++++++++++++++++++++++++++
5 files changed, 218 insertions(+), 0 deletions(-)
create mode 100644 arch/powerpc/platforms/amigaone/Kconfig
create mode 100644 arch/powerpc/platforms/amigaone/Makefile
create mode 100644 arch/powerpc/platforms/amigaone/setup.c
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 47fe2be..3fce996 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -28,6 +28,7 @@ source "arch/powerpc/platforms/86xx/Kconfig"
source "arch/powerpc/platforms/embedded6xx/Kconfig"
source "arch/powerpc/platforms/44x/Kconfig"
source "arch/powerpc/platforms/40x/Kconfig"
+source "arch/powerpc/platforms/amigaone/Kconfig"
config PPC_NATIVE
bool
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index 8079e0b..f741919 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -19,3 +19,4 @@ obj-$(CONFIG_PPC_PASEMI) += pasemi/
obj-$(CONFIG_PPC_CELL) += cell/
obj-$(CONFIG_PPC_PS3) += ps3/
obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/
+obj-$(CONFIG_AMIGAONE) += amigaone/
diff --git a/arch/powerpc/platforms/amigaone/Kconfig b/arch/powerpc/platforms/amigaone/Kconfig
new file mode 100644
index 0000000..9276a96
--- /dev/null
+++ b/arch/powerpc/platforms/amigaone/Kconfig
@@ -0,0 +1,18 @@
+config AMIGAONE
+ bool "Eyetech AmigaOne/MAI Teron"
+ depends on PPC32 && BROKEN_ON_SMP && PPC_MULTIPLATFORM
+ select PPC_I8259
+ select PPC_INDIRECT_PCI
+ select PPC_UDBG_16550
+ select PCI
+ select NOT_COHERENT_CACHE
+ select CHECK_CACHE_COHERENCY
+ select DEFAULT_UIMAGE
+ select PCSPKR_PLATFORM
+ help
+ Select AmigaOne for the following machines:
+ - AmigaOne SE/Teron CX (G3 only)
+ - AmigaOne XE/Teron PX
+ - uA1/Teron mini
+ More information is available at:
+ <http://amigaone-linux.sourceforge.net/>.
diff --git a/arch/powerpc/platforms/amigaone/Makefile b/arch/powerpc/platforms/amigaone/Makefile
new file mode 100644
index 0000000..e6885b3
--- /dev/null
+++ b/arch/powerpc/platforms/amigaone/Makefile
@@ -0,0 +1 @@
+obj-y += setup.o
diff --git a/arch/powerpc/platforms/amigaone/setup.c b/arch/powerpc/platforms/amigaone/setup.c
new file mode 100644
index 0000000..30c9b46
--- /dev/null
+++ b/arch/powerpc/platforms/amigaone/setup.c
@@ -0,0 +1,197 @@
+/*
+ * AmigaOne platform setup
+ *
+ * Copyright 2008 Gerhard Pircher (gerhard_pircher@gmx.net)
+ *
+ * Based on original amigaone_setup.c source code
+ * Copyright 2003 by Hans-Joerg Frieden and Thomas Frieden
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/seq_file.h>
+#include <linux/utsrelease.h>
+
+#include <asm/machdep.h>
+#include <asm/cputable.h>
+#include <asm/prom.h>
+#include <asm/pci-bridge.h>
+#include <asm/i8259.h>
+#include <asm/time.h>
+#include <asm/udbg.h>
+
+void amigaone_show_cpuinfo(struct seq_file *m)
+{
+ struct device_node *root;
+ const char *model = "";
+
+ root = of_find_node_by_path("/");
+ if (root)
+ model = of_get_property(root, "model", NULL);
+ seq_printf(m, "machine\t\t: %s\n", model);
+
+ of_node_put(root);
+ return;
+}
+
+static int __init amigaone_add_bridge(struct device_node *dev)
+{
+ int len;
+ struct pci_controller *hose;
+ const int *bus_range;
+
+ printk(KERN_INFO "Adding PCI host bridge %s\n", dev->full_name);
+
+ bus_range = of_get_property(dev, "bus-range", &len);
+ if ((bus_range == NULL) || (len < 2 * sizeof(int)))
+ printk(KERN_WARNING "Can't get bus-range for %s, assume"
+ " bus 0\n", dev->full_name);
+
+ hose = pcibios_alloc_controller(dev);
+ if (hose == NULL)
+ return -ENOMEM;
+
+ hose->first_busno = bus_range ? bus_range[0] : 0;
+ hose->last_busno = bus_range ? bus_range[1] : 0xff;
+
+ setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc, 0);
+
+ /* Interpret the "ranges" property */
+ /* This also maps the I/O region and sets isa_io/mem_base */
+ pci_process_bridge_OF_ranges(hose, dev, 1);
+
+ return 0;
+}
+
+void __init amigaone_setup_arch(void)
+{
+ struct device_node *np;
+
+ /* Initialization until calibrate_delay() runs. */
+ loops_per_jiffy = 50000000/HZ;
+
+ /* Lookup PCI host bridges. */
+ for_each_compatible_node(np, "pci", "mai-logic,articia-s")
+ amigaone_add_bridge(np);
+
+ if (ppc_md.progress)
+ ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0);
+}
+
+void __init amigaone_init_IRQ(void)
+{
+ struct device_node *pic, *np = NULL;
+ const unsigned long *prop = NULL;
+ unsigned long int_ack = 0;
+
+ /* Search for ISA interrupt controller. */
+ pic = of_find_compatible_node(NULL, "interrupt-controller",
+ "pnpPNP,000");
+ BUG_ON(pic == NULL);
+
+ /* Look for interrupt acknowledge address in the PCI root node. */
+ np = of_find_compatible_node(NULL, "pci", "mai-logic,articia-s");
+ if (np) {
+ prop = of_get_property(np, "8259-interrupt-acknowledge", NULL);
+ if (prop)
+ int_ack = prop[0];
+ of_node_put(np);
+ }
+
+ if (int_ack == 0)
+ printk(KERN_WARNING "Cannot find PCI interrupt acknowledge"
+ " address, polling\n");
+
+ i8259_init(pic, int_ack);
+ ppc_md.get_irq = i8259_irq;
+ irq_set_default_host(i8259_get_host());
+}
+
+void __init amigaone_init(void)
+{
+ request_region(0x00, 0x20, "dma1");
+ request_region(0x40, 0x20, "timer");
+ request_region(0x80, 0x10, "dma page reg");
+ request_region(0xc0, 0x20, "dma2");
+}
+
+/* Copied from U-Boot. */
+static inline void amigaone_soft_restart(unsigned long addr)
+{
+ /* SRR0 has system reset vector, SRR1 has default MSR value.
+ * rfi restores MSR from SRR1 and sets the PC to the SRR0 value.
+ */
+ __asm__ __volatile__ ("mtspr 26, %0" :: "r" (addr));
+ __asm__ __volatile__ ("li 4, (1 << 6)" ::: "r4");
+ __asm__ __volatile__ ("mtspr 27, 4");
+ __asm__ __volatile__ ("rfi");
+}
+
+void amigaone_restart(char *cmd)
+{
+ unsigned long addr;
+
+ local_irq_disable();
+
+ /* Flush and disable I/D cache. */
+ __asm__ __volatile__ ("mfspr 3, 1008" ::: "r3");
+ __asm__ __volatile__ ("ori 5, 5, 0xcc00" ::: "r5");
+ __asm__ __volatile__ ("ori 4, 3, 0xc00" ::: "r4");
+ __asm__ __volatile__ ("andc 5, 3, 5" ::: "r5");
+ __asm__ __volatile__ ("sync");
+ __asm__ __volatile__ ("mtspr 1008, 4");
+ __asm__ __volatile__ ("isync");
+ __asm__ __volatile__ ("sync");
+ __asm__ __volatile__ ("mtspr 1008, 5");
+ __asm__ __volatile__ ("isync");
+ __asm__ __volatile__ ("sync");
+
+ addr = 0xfff00100;
+ amigaone_soft_restart(addr);
+
+ /* Not reached. */
+ while (1);
+}
+
+static int __init amigaone_probe(void)
+{
+ unsigned long root = of_get_flat_dt_root();
+
+ if (of_flat_dt_is_compatible(root, "eyetech,amigaone")) {
+ /* Coherent memory access cause complete system lockup! Thus
+ * disable this CPU feature, even if the CPU needs it. The L2
+ * cache prefetch engines sould be disabled later on.
+ */
+ cur_cpu_spec->cpu_features &= ~CPU_FTR_NEED_COHERENT;
+
+ /* Patch out unwanted feature. */
+ do_feature_fixups(cur_cpu_spec->cpu_features,
+ PTRRELOC(&__start___ftr_fixup),
+ PTRRELOC(&__stop___ftr_fixup));
+
+ ISA_DMA_THRESHOLD = 0x00ffffff;
+ DMA_MODE_READ = 0x44;
+ DMA_MODE_WRITE = 0x48;
+
+ return 1;
+ }
+
+ return 0;
+}
+
+define_machine(amigaone) {
+ .name = "AmigaOne",
+ .probe = amigaone_probe,
+ .setup_arch = amigaone_setup_arch,
+ .init = amigaone_init,
+ .show_cpuinfo = amigaone_show_cpuinfo,
+ .init_IRQ = amigaone_init_IRQ,
+ .restart = amigaone_restart,
+ .calibrate_decr = generic_calibrate_decr,
+ .progress = udbg_progress,
+};
--
1.5.6.5
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
2009-01-07 13:54 [PATCH 1/5] powerpc: Add platform support for AmigaOne Gerhard Pircher
@ 2009-01-07 14:12 ` Gerhard Pircher
2009-01-07 15:13 ` Grant Likely
0 siblings, 1 reply; 11+ messages in thread
From: Gerhard Pircher @ 2009-01-07 14:12 UTC (permalink / raw)
To: linuxppc-dev, bzolnier
The AmigaOne uses the onboard VIA IDE controller in legacy mode (like the
Pegasos).
Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
---
drivers/ide/via82cxxx.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
index 2a812d3..086f476 100644
--- a/drivers/ide/via82cxxx.c
+++ b/drivers/ide/via82cxxx.c
@@ -450,6 +450,11 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i
d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
#endif
+#ifdef CONFIG_AMIGAONE
+ if (machine_is(amigaone))
+ d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
+#endif
+
d.udma_mask = via_config->udma_mask;
vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
--
1.5.6.5
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
2009-01-07 14:12 ` [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards Gerhard Pircher
@ 2009-01-07 15:13 ` Grant Likely
2009-01-07 15:27 ` Gerhard Pircher
0 siblings, 1 reply; 11+ messages in thread
From: Grant Likely @ 2009-01-07 15:13 UTC (permalink / raw)
To: Gerhard Pircher; +Cc: linuxppc-dev, bzolnier
On Wed, Jan 7, 2009 at 7:12 AM, Gerhard Pircher <gerhard_pircher@gmx.net> wrote:
> The AmigaOne uses the onboard VIA IDE controller in legacy mode (like the
> Pegasos).
>
> Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
> ---
> drivers/ide/via82cxxx.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
This patch needs to also be posted on the linux-ide mailing list.
> diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
> index 2a812d3..086f476 100644
> --- a/drivers/ide/via82cxxx.c
> +++ b/drivers/ide/via82cxxx.c
> @@ -450,6 +450,11 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i
> d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
> #endif
>
> +#ifdef CONFIG_AMIGAONE
> + if (machine_is(amigaone))
> + d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
> +#endif
> +
I know you're just following the example of the PEGASOS workaround
immediately above; but the #defines are really ugly. I wonder if
there is there a cleaner way to manipulate the flags.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
2009-01-07 15:13 ` Grant Likely
@ 2009-01-07 15:27 ` Gerhard Pircher
2009-01-11 16:51 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 11+ messages in thread
From: Gerhard Pircher @ 2009-01-07 15:27 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, bzolnier
-------- Original-Nachricht --------
> Datum: Wed, 7 Jan 2009 08:13:06 -0700
> Von: "Grant Likely" <grant.likely@secretlab.ca>
> An: "Gerhard Pircher" <gerhard_pircher@gmx.net>
> CC: linuxppc-dev@ozlabs.org, bzolnier@gmail.com
> Betreff: Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
> On Wed, Jan 7, 2009 at 7:12 AM, Gerhard Pircher <gerhard_pircher@gmx.net>
> wrote:
> > The AmigaOne uses the onboard VIA IDE controller in legacy mode (like
> the
> > Pegasos).
> >
> > Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
> > ---
> > drivers/ide/via82cxxx.c | 5 +++++
> > 1 files changed, 5 insertions(+), 0 deletions(-)
>
> This patch needs to also be posted on the linux-ide mailing list.
Ouch, I only sent it to the maintainer. I'll fix that.
> > diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
> > index 2a812d3..086f476 100644
> > --- a/drivers/ide/via82cxxx.c
> > +++ b/drivers/ide/via82cxxx.c
> > @@ -450,6 +450,11 @@ static int __devinit via_init_one(struct pci_dev
> *dev, const struct pci_device_i
> > d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
> > #endif
> >
> > +#ifdef CONFIG_AMIGAONE
> > + if (machine_is(amigaone))
> > + d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
> > +#endif
> > +
>
> I know you're just following the example of the PEGASOS workaround
> immediately above; but the #defines are really ugly. I wonder if
> there is there a cleaner way to manipulate the flags.
AFAIK the via82cxxx driver doesn't make use of the pci_get_legacy_ide_irq
approach.
Gerhard
--
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
2009-01-07 15:27 ` Gerhard Pircher
@ 2009-01-11 16:51 ` Bartlomiej Zolnierkiewicz
2009-01-11 20:05 ` Gerhard Pircher
0 siblings, 1 reply; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-01-11 16:51 UTC (permalink / raw)
To: Gerhard Pircher; +Cc: linuxppc-dev, linux-ide
On Wednesday 07 January 2009, Gerhard Pircher wrote:
>
> -------- Original-Nachricht --------
> > Datum: Wed, 7 Jan 2009 08:13:06 -0700
> > Von: "Grant Likely" <grant.likely@secretlab.ca>
> > An: "Gerhard Pircher" <gerhard_pircher@gmx.net>
> > CC: linuxppc-dev@ozlabs.org, bzolnier@gmail.com
> > Betreff: Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
>
> > On Wed, Jan 7, 2009 at 7:12 AM, Gerhard Pircher <gerhard_pircher@gmx.net>
> > wrote:
> > > The AmigaOne uses the onboard VIA IDE controller in legacy mode (like
> > the
> > > Pegasos).
> > >
> > > Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
> > > ---
> > > drivers/ide/via82cxxx.c | 5 +++++
> > > 1 files changed, 5 insertions(+), 0 deletions(-)
> >
> > This patch needs to also be posted on the linux-ide mailing list.
> Ouch, I only sent it to the maintainer. I'll fix that.
[ Please also keep all previous recipients on cc: when doing so. ]
> > > diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
> > > index 2a812d3..086f476 100644
> > > --- a/drivers/ide/via82cxxx.c
> > > +++ b/drivers/ide/via82cxxx.c
> > > @@ -450,6 +450,11 @@ static int __devinit via_init_one(struct pci_dev
> > *dev, const struct pci_device_i
> > > d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
> > > #endif
> > >
> > > +#ifdef CONFIG_AMIGAONE
> > > + if (machine_is(amigaone))
> > > + d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
> > > +#endif
> > > +
> >
> > I know you're just following the example of the PEGASOS workaround
> > immediately above; but the #defines are really ugly. I wonder if
> > there is there a cleaner way to manipulate the flags.
> AFAIK the via82cxxx driver doesn't make use of the pci_get_legacy_ide_irq
> approach.
I applied your patch for 2.6.29 but for 2.6.30 I would ask you to clean
up #ifdefs by using ide_pci_is_in_compatibility_mode() helper instead for
checking if IDE_HFLAG_FORCE_LEGACY_IRQS should be set.
[ Some time ago Pegasos got PCI quirk to put controller in the legacy mode
(arch/powerpc/platforms/chrp/pci.c) so it is OK to also remove Pegasos'
special case while at it. ]
Thanks,
Bart
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
2009-01-11 16:51 ` Bartlomiej Zolnierkiewicz
@ 2009-01-11 20:05 ` Gerhard Pircher
2009-01-12 17:55 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 11+ messages in thread
From: Gerhard Pircher @ 2009-01-11 20:05 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linuxppc-dev
-------- Original-Nachricht --------
> Datum: Sun, 11 Jan 2009 17:51:55 +0100
> Von: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> An: "Gerhard Pircher" <gerhard_pircher@gmx.net>
> CC: "Grant Likely" <grant.likely@secretlab.ca>, linuxppc-dev@ozlabs.org, linux-ide@vger.kernel.org
> Betreff: Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
> On Wednesday 07 January 2009, Gerhard Pircher wrote:
> >
> > -------- Original-Nachricht --------
> > > Datum: Wed, 7 Jan 2009 08:13:06 -0700
> > > Von: "Grant Likely" <grant.likely@secretlab.ca>
> > > An: "Gerhard Pircher" <gerhard_pircher@gmx.net>
> > > CC: linuxppc-dev@ozlabs.org, bzolnier@gmail.com
> > > Betreff: Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for
> AmigaOne boards
> >
> > > On Wed, Jan 7, 2009 at 7:12 AM, Gerhard Pircher
> <gerhard_pircher@gmx.net>
> > > wrote:
> > > > The AmigaOne uses the onboard VIA IDE controller in legacy mode
> > > >(like the Pegasos).
> > > >
> > > > Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
> > > > ---
> > > > drivers/ide/via82cxxx.c | 5 +++++
> > > > 1 files changed, 5 insertions(+), 0 deletions(-)
> > >
> > > This patch needs to also be posted on the linux-ide mailing list.
> > Ouch, I only sent it to the maintainer. I'll fix that.
>
> [ Please also keep all previous recipients on cc: when doing so. ]
Okay, I'll keep that in mind.
> > > > diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
> > > > index 2a812d3..086f476 100644
> > > > --- a/drivers/ide/via82cxxx.c
> > > > +++ b/drivers/ide/via82cxxx.c
> > > > @@ -450,6 +450,11 @@ static int __devinit via_init_one(struct
> pci_dev
> > > *dev, const struct pci_device_i
> > > > d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
> > > > #endif
> > > >
> > > > +#ifdef CONFIG_AMIGAONE
> > > > + if (machine_is(amigaone))
> > > > + d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
> > > > +#endif
> > > > +
> > >
> > > I know you're just following the example of the PEGASOS workaround
> > > immediately above; but the #defines are really ugly. I wonder if
> > > there is there a cleaner way to manipulate the flags.
> > AFAIK the via82cxxx driver doesn't make use of the
> > pci_get_legacy_ide_irq approach.
>
> I applied your patch for 2.6.29 but for 2.6.30 I would ask you to clean
> up #ifdefs by using ide_pci_is_in_compatibility_mode() helper instead for
> checking if IDE_HFLAG_FORCE_LEGACY_IRQS should be set.
Wouldn't it be better, if I clean this up now? (I have to resend my AmigaOne
platform patches anyway).
> [ Some time ago Pegasos got PCI quirk to put controller in the legacy mode
> (arch/powerpc/platforms/chrp/pci.c) so it is OK to also remove Pegasos'
> special case while at it. ]
Okay, so the change shouldn't break IDE for Pegasos machines (I don't have
a Pegasos for testing).
Thanks!
Gerhard
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
2009-01-11 20:05 ` Gerhard Pircher
@ 2009-01-12 17:55 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-01-12 17:55 UTC (permalink / raw)
To: Gerhard Pircher; +Cc: linux-ide, linuxppc-dev
On Sunday 11 January 2009, Gerhard Pircher wrote:
>
> -------- Original-Nachricht --------
> > Datum: Sun, 11 Jan 2009 17:51:55 +0100
> > Von: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > An: "Gerhard Pircher" <gerhard_pircher@gmx.net>
> > CC: "Grant Likely" <grant.likely@secretlab.ca>, linuxppc-dev@ozlabs.org, linux-ide@vger.kernel.org
> > Betreff: Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards
>
> > On Wednesday 07 January 2009, Gerhard Pircher wrote:
> > >
> > > -------- Original-Nachricht --------
> > > > Datum: Wed, 7 Jan 2009 08:13:06 -0700
> > > > Von: "Grant Likely" <grant.likely@secretlab.ca>
> > > > An: "Gerhard Pircher" <gerhard_pircher@gmx.net>
> > > > CC: linuxppc-dev@ozlabs.org, bzolnier@gmail.com
> > > > Betreff: Re: [PATCH 5/5] ide: Force VIA IDE legacy interrupts for
> > AmigaOne boards
> > >
> > > > On Wed, Jan 7, 2009 at 7:12 AM, Gerhard Pircher
> > <gerhard_pircher@gmx.net>
> > > > wrote:
> > > > > The AmigaOne uses the onboard VIA IDE controller in legacy mode
> > > > >(like the Pegasos).
> > > > >
> > > > > Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
> > > > > ---
> > > > > drivers/ide/via82cxxx.c | 5 +++++
> > > > > 1 files changed, 5 insertions(+), 0 deletions(-)
> > > >
> > > > This patch needs to also be posted on the linux-ide mailing list.
> > > Ouch, I only sent it to the maintainer. I'll fix that.
> >
> > [ Please also keep all previous recipients on cc: when doing so. ]
> Okay, I'll keep that in mind.
>
> > > > > diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
> > > > > index 2a812d3..086f476 100644
> > > > > --- a/drivers/ide/via82cxxx.c
> > > > > +++ b/drivers/ide/via82cxxx.c
> > > > > @@ -450,6 +450,11 @@ static int __devinit via_init_one(struct
> > pci_dev
> > > > *dev, const struct pci_device_i
> > > > > d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
> > > > > #endif
> > > > >
> > > > > +#ifdef CONFIG_AMIGAONE
> > > > > + if (machine_is(amigaone))
> > > > > + d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
> > > > > +#endif
> > > > > +
> > > >
> > > > I know you're just following the example of the PEGASOS workaround
> > > > immediately above; but the #defines are really ugly. I wonder if
> > > > there is there a cleaner way to manipulate the flags.
> > > AFAIK the via82cxxx driver doesn't make use of the
> > > pci_get_legacy_ide_irq approach.
> >
> > I applied your patch for 2.6.29 but for 2.6.30 I would ask you to clean
> > up #ifdefs by using ide_pci_is_in_compatibility_mode() helper instead for
> > checking if IDE_HFLAG_FORCE_LEGACY_IRQS should be set.
> Wouldn't it be better, if I clean this up now? (I have to resend my AmigaOne
> platform patches anyway).
Replacement patch instead of incremental one is also fine with me -- given
that it can wait for 2.6.30.
> > [ Some time ago Pegasos got PCI quirk to put controller in the legacy mode
> > (arch/powerpc/platforms/chrp/pci.c) so it is OK to also remove Pegasos'
> > special case while at it. ]
> Okay, so the change shouldn't break IDE for Pegasos machines (I don't have
> a Pegasos for testing).
Yes but there may be some other platforms (not necessarily powerpc ones)
that may be affected (i.e. they can depend indirectly on IRQ auto-probing
during IDE probe) so cleanup patch needs to spend some time in linux-next.
Thanks,
Bart
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-01-20 11:25 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 23:39 [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards Gerhard Pircher
2009-01-13 5:02 ` Benjamin Herrenschmidt
2009-01-13 12:33 ` Gerhard Pircher
2009-01-19 18:28 ` Bartlomiej Zolnierkiewicz
[not found] <3a68e478a75.2662f91@smtp.lizzy.com.au>
2009-01-20 11:25 ` Gerhard Pircher
-- strict thread matches above, loose matches on Subject: below --
2009-01-07 13:54 [PATCH 1/5] powerpc: Add platform support for AmigaOne Gerhard Pircher
2009-01-07 14:12 ` [PATCH 5/5] ide: Force VIA IDE legacy interrupts for AmigaOne boards Gerhard Pircher
2009-01-07 15:13 ` Grant Likely
2009-01-07 15:27 ` Gerhard Pircher
2009-01-11 16:51 ` Bartlomiej Zolnierkiewicz
2009-01-11 20:05 ` Gerhard Pircher
2009-01-12 17:55 ` Bartlomiej Zolnierkiewicz
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).