From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-pcmcia <linux-pcmcia@lists.infradead.org>,
Andrew Morton <akpm@osdl.org>, Guylhem Aznar <pcmcia@externe.net>
Subject: Re: [PATCH] yenta: irq-routing for TI bridges
Date: Tue, 24 Feb 2004 00:00:51 +0000 [thread overview]
Message-ID: <20040224000051.C25358@flint.arm.linux.org.uk> (raw)
In-Reply-To: <200402240033.31042.daniel.ritz@gmx.ch>; from daniel.ritz@gmx.ch on Tue, Feb 24, 2004 at 12:33:31AM +0100
On Tue, Feb 24, 2004 at 12:33:31AM +0100, Daniel Ritz wrote:
> this patch should fix up wrongly initialized TI bridges. in a safe way
> (hopefully).
Unfortunately not.
This is a working setup:
DCR = 6162
MUX = fba97543
Changing MUX from those values _breaks_. Let's see what the code does.
> + /* check IRQ routing to see if 16bit cards would work */
> + irqmux = irqmux_old = config_readl(socket, TI122X_IRQMUX);
> + devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
> + printk(KERN_INFO "Yenta TI: irqmux %08x, devctl %02x\n", irqmux, devctl);
> +
> +#if 1
> + /* serialized interrupts: MFUNC3 must be IRQSER */
> + if (devctl & TI113X_DCR_IMODE_SERIAL)
> + irqmux = (irqmux & ~0xf000) | 0x1000;
> +#endif
DCR doesn't have bit 2 set, so we don't change this (which is fine.)
>
> +#if 1
> + /* if we have all serial: probe, fall back to parallel PCI */
> + if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {
Not true, so this is skipped (which again is fine.)
> + /* write down if changed, probe */
> + if (irqmux_old != irqmux) {
> + printk(KERN_INFO "Yenta TI: changing to %08x", irqmux);
> config_writel(socket, TI122X_IRQMUX, irqmux);
> + }
> +
> + probe_mask = yenta_probe_irq(socket, isa_interrupts);
> + if (!probe_mask) {
> + /* no chance to have all serial working -> PCI */
> + printk(KERN_INFO "Yenta TI: serial interrupts not working -> PCI\n");
> + devctl &= ~TI113X_DCR_IMODE_MASK;
> config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
> }
> }
> #endif
>
> + /* parallel PCI interrupts: MFUNC0 must be INTA */
> + if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {
Ok, this is true.
> + u32 sysctl;
> + irqmux = (irqmux & ~0x0f) | 0x02;
Whoops, we've just taken out IRQ3 as a routed ISA IRQ.
> +
> + /* route INTB depending on INTRTIE */
> + switch (socket->dev->device) {
> + /* there are more... */
> + case PCI_DEVICE_ID_TI_1220:
> + case PCI_DEVICE_ID_TI_1221:
> + case PCI_DEVICE_ID_TI_1225:
> + case PCI_DEVICE_ID_TI_1420:
> + case PCI_DEVICE_ID_TI_1450:
> + //case PCI_DEVICE_ID_TI_1451:
> + case PCI_DEVICE_ID_TI_1520:
> + sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL);
> + if (!(sysctl & TI122X_SCR_INTRTIE))
> + irqmux = (irqmux & ~0xf0) | 0x20;
Whoops, just taken out IRQ4 as a routed ISA IRQ.
> +
> + default:
> + break;
> + }
> + }
> +
> + if (irqmux_old != irqmux) {
> + printk(KERN_INFO "Yenta TI: changing to %08x", irqmux);
> + config_writel(socket, TI122X_IRQMUX, irqmux);
> + }
Net result - not good and probably not acceptable.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
next prev parent reply other threads:[~2004-02-24 0:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-23 23:33 [PATCH] yenta: irq-routing for TI bridges Daniel Ritz
2004-02-24 0:00 ` Russell King [this message]
2004-02-24 0:32 ` Daniel Ritz
2004-02-24 1:06 ` Pavel Roskin
2004-02-24 11:59 ` Daniel Ritz
2004-02-24 12:40 ` Russell King
2004-02-24 15:23 ` Daniel Ritz
2004-02-24 23:26 ` [PATCH] yenta: irq-routing for TI bridges - take 2 Daniel Ritz
2004-02-25 6:55 ` Pavel Roskin
2004-02-25 20:03 ` Daniel Ritz
2004-02-25 21:20 ` Pavel Roskin
2004-02-25 23:01 ` Daniel Ritz
2004-02-24 16:38 ` [PATCH] yenta: irq-routing for TI bridges David Hinds
2004-02-24 0:46 ` Pavel Roskin
2004-02-24 12:44 ` Russell King
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=20040224000051.C25358@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=akpm@osdl.org \
--cc=daniel.ritz@gmx.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=pcmcia@externe.net \
/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