On Tuesday 29 June 2010 15:53:54 Bruno Randolf wrote:
> On Monday 28 June 2010 17:18:48 Florian Fainelli wrote:
> > Hey,
> > 
> > On Tuesday 20 April 2010 12:51:23 Manuel Lauss wrote:
> > > Hi Florian,
> > > 
> > > On Mon, Apr 19, 2010 at 10:54 AM, Florian Fainelli
> > > <[email protected]>
> > 
> > wrote:
> > > >> The lspci output provided by the reporter of ticket 6851, does it
> > > >> look correct for
> > > >> MTX-1?
> > > > 
> > > > No it does not. It should only show a PCI bridge and the devices
> > > > attached to it, in my case 2 Atheros-based cards.
> > > 
> > > This matches the description of a bug fixed in August 2006:
> > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=comm
> > > it di ff;h=32136568a9828c27c07eedb8d2b3e3d9fe8d87ba
> > > 
> > > If you don't come up with anything, I'll dig into this Friday evening.
> > 
> > Can anyone check if the following patch fixes the issue? I will test it
> > tonight anyway.
> > 
> > diff --git a/arch/mips/alchemy/mtx-1/board_setup.c
> > b/arch/mips/alchemy/mtx-1/board_setup.c
> > index a9f0336..c2c29e5 100644
> > --- a/arch/mips/alchemy/mtx-1/board_setup.c
> > +++ b/arch/mips/alchemy/mtx-1/board_setup.c
> > @@ -117,9 +117,9 @@ mtx1_pci_idsel(unsigned int devsel, int assert)
> > 
> >         if (assert && devsel != 0)
> >         
> >                 /* Suppress signal to Cardbus */
> > 
> > -               gpio_set_value(1, 0);   /* set EXT_IO3 OFF */
> > +               alchemy_gpio_direction_output(1, 0);    /* set EXT_IO3
> > OFF */ else
> > -               gpio_set_value(1, 1);   /* set EXT_IO3 ON */
> > +               alchemy_gpio_direction_output(1, 1);    /* set EXT_IO3 ON
> > */
> > 
> >         au_sync_udelay(1);
> >         return 1;
> 
> hi florian! hi manuel!
> 
> i cannot test right now (broke my f$%*ing serial cable), but i doubt that
> this is it. wouldn't you want to use alchemy_gpio_set_value() instead?

That's what alchemy_gpio_set_value calls in the end.

> also this GPIO is used only for the cardbus workaround on the singleboard
> and it should not affect normal PCI bus operation...
> 
> but there must be something wrong with GPIO... last weekend i bisected it
> down to commit bb706b28bbd647c2fd7f22d6bf03a18b9552be05 "MIPS: Alchemy:
> MTX-1: Use linux gpio api." PCI works when i revert that commit... still i
> can't see what's wrong with it.

It is wrong because it affects the timing of the calls since it introduces an 
aditionnal au_sync() call.

I have no yet compared the two assembly outputs.
--
Florian
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to