[PATCH] yenta: irq-routing for TI bridges...again
Daniel Ritz
daniel.ritz at gmx.ch
Mon Mar 15 23:38:28 GMT 2004
On Monday 15 March 2004 08:43, Pavel Roskin wrote:
> On Sun, 14 Mar 2004, Daniel Ritz wrote:
>
> > > > > 3) Do we want to try to enable ISA interrupts if PCI interrupts are
> > > > > working and ISA interrupts are not?
> > > >
> > > > don't know...why not?
> > >
> > > I suspect probing them may be hazardous - sure it can be tried, but I
> > > think it should be treated as a separate problem to the present one.
> > > I think it'll need a lot more testing on more hardware.
> > >
> >
> > ok, so my current patch has the ISA part disabled. if ISA is not working
> > fall back to PCI directly...
> >
> > my current patch:
> > http://ritz.dnsalias.org/linux/pcmcia-ti-routing-7.patch
>
> The patch is quite unreadable. I reverted unrelated parts to make it
> readable. We can remove commented out code later. It's more important
> that we don't miss any bugs. The improved patch is attached.
you undid moving around yenta_probe_irq(), plus added the prototypes on top
somewhere. ok. anything else i might have missed?
(btw. you missed something: isa_interrupts is now declared twice :)
>
> I don't understand why we need to probe ISA interrupts in
> ti12xx_irqroute_func0(). I think we have agreed that we need PCI
> interrupts for CSC events even if ISA interrupts are working.
>
ok, just nuke it completely. we use PCI interrupts anyway if ISAs are not
working.
> Even if we ruins ISA interrupts completely (not likely) but fix PCI
> interrupts we are still better off.
>
removing it completely does nothing to ISA interrupts. it can't get worse...
> The patch is working fine with TI PCI1221. This is what I get on startup:
>
> Yenta: CardBus bridge found at 0000:00:08.0 [133f:1233]
> Yenta: Enabling burst memory read transactions
> Yenta: Using CSCINT to route CSC interrupts to PCI
> Yenta: Routing CardBus interrupts to PCI
> Yenta TI: socket 0000:00:08.0, mfunc 0x0cc07d92, devctl 0x60
> Yenta: ISA IRQ mask 0x0000, PCI irq 12
> Socket status: 30000010
> Yenta: CardBus bridge found at 0000:00:08.1 [133f:1233]
> Yenta: Using CSCINT to route CSC interrupts to PCI
> Yenta: Routing CardBus interrupts to PCI
> Yenta TI: socket 0000:00:08.1, mfunc 0x0cc07d92, devctl 0x60
> Yenta: ISA IRQ mask 0x0000, PCI irq 12
> Socket status: 30000010
>
>
> Then I added this code to the beginning of ti12xx_override():
>
> if (PCI_FUNC(socket->dev->devfn) == 0) {
> ti_irqmux(socket) = 0;
> config_writel(socket, TI122X_MFUNC, ti_irqmux(socket));
> ti_devctl(socket) = 0x66;
> config_writeb(socket, TI113X_DEVICE_CONTROL, ti_devctl(socket));
> }
>
>
> When I loaded yenta_socket, I got this:
>
> Yenta: CardBus bridge found at 0000:00:08.0 [133f:1233]
> Yenta: Using CSCINT to route CSC interrupts to PCI
> Yenta: Routing CardBus interrupts to PCI
> Yenta TI: socket 0000:00:08.0, mfunc 0x00000000, devctl 0x66
> Yenta TI: socket 0000:00:08.0 probing PCI interrupt failed, trying to fix
> Yenta TI: socket 0000:00:08.0 falling back to parallel PCI interrupts
> Yenta TI: socket 0000:00:08.0 parallel PCI interrupts ok
> Yenta TI: socket 0000:00:08.0 routing card interrupts to PCI
> Yenta: ISA IRQ mask 0x0000, PCI irq 12
> Socket status: 30000010
> Yenta: CardBus bridge found at 0000:00:08.1 [133f:1233]
> Yenta: Using CSCINT to route CSC interrupts to PCI
> Yenta: Routing CardBus interrupts to PCI
> Yenta TI: socket 0000:00:08.1, mfunc 0x00000002, devctl 0x60
> Yenta: ISA IRQ mask 0x0000, PCI irq 12
> Socket status: 30000010
>
nice. this means your chip has the INTRTIE already set. the 1221 has INTB only
in MFUNC1 which is zero. looking at the correct value you have mfunc1 set to
isa irq 9. if you like you can clear that bit in your make-it-non-working code to
see the func1 code in action :)
btw. the lines
ti_irqmux(socket) = 0;
ti_devctl(socket) = 0x66;
are unnecessary there. just write directly into the register.
rgds
-daniel
ps:
new patch w/o moving yenta_probe_irq() and w/o the whole ISA probing
stuff is at:
http://ritz.dnsalias.org/linux/pcmcia-ti-routing-8.patch
More information about the linux-pcmcia
mailing list