Re: [OpenWrt-Devel] PCI broken on au1000
Hi Bruno, On Thursday 01 July 2010 17:08:33 Bruno Randolf wrote: > hi! > > it seems the problem was alchemy_gpio2_enable(); everything works fine when > i remove that call. maybe the problem is that PCI_SERR and PCI_RST# are > connected to the GPIO2 block and they don't like the reset of GPIO2? > > in the following patch i also remove the now unnecessary au_sync from > udelay(), as manuel lauss pointed out, and some dead code. florian, could > you commit it to the backfire branch? Sure, thanks for the patch. > > manuel, if you agree with this patch, i'll post it to linux-mips, too. > > bruno > > diff --git a/arch/mips/alchemy/mtx-1/board_setup.c > b/arch/mips/alchemy/mtx-1/board_setup.c > index 45b61c9..17140ac 100644 > --- a/arch/mips/alchemy/mtx-1/board_setup.c > +++ b/arch/mips/alchemy/mtx-1/board_setup.c > @@ -56,8 +56,6 @@ void __init board_setup(void) > } > #endif > > - alchemy_gpio2_enable(); > - > #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) > /* Enable USB power switch */ > alchemy_gpio_direction_output(204, 0); > @@ -92,20 +90,12 @@ void __init board_setup(void) > int > mtx1_pci_idsel(unsigned int devsel, int assert) > { > -#define MTX_IDSEL_ONLY_0_AND_3 0 > -#if MTX_IDSEL_ONLY_0_AND_3 > - if (devsel != 0 && devsel != 3) { > - printk(KERN_ERR "*** not 0 or 3\n"); > - return 0; > - } > -#endif > - > if (assert && devsel != 0) > /* Suppress signal to Cardbus */ > gpio_set_value(1, 0); /* set EXT_IO3 OFF */ > else > gpio_set_value(1, 1); /* set EXT_IO3 ON */ > > - au_sync_udelay(1); > + udelay(1); > return 1; > } ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
hi! it seems the problem was alchemy_gpio2_enable(); everything works fine when i remove that call. maybe the problem is that PCI_SERR and PCI_RST# are connected to the GPIO2 block and they don't like the reset of GPIO2? in the following patch i also remove the now unnecessary au_sync from udelay(), as manuel lauss pointed out, and some dead code. florian, could you commit it to the backfire branch? manuel, if you agree with this patch, i'll post it to linux-mips, too. bruno diff --git a/arch/mips/alchemy/mtx-1/board_setup.c b/arch/mips/alchemy/mtx-1/board_setup.c index 45b61c9..17140ac 100644 --- a/arch/mips/alchemy/mtx-1/board_setup.c +++ b/arch/mips/alchemy/mtx-1/board_setup.c @@ -56,8 +56,6 @@ void __init board_setup(void) } #endif - alchemy_gpio2_enable(); - #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) /* Enable USB power switch */ alchemy_gpio_direction_output(204, 0); @@ -92,20 +90,12 @@ void __init board_setup(void) int mtx1_pci_idsel(unsigned int devsel, int assert) { -#define MTX_IDSEL_ONLY_0_AND_3 0 -#if MTX_IDSEL_ONLY_0_AND_3 - if (devsel != 0 && devsel != 3) { - printk(KERN_ERR "*** not 0 or 3\n"); - return 0; - } -#endif - if (assert && devsel != 0) /* Suppress signal to Cardbus */ gpio_set_value(1, 0); /* set EXT_IO3 OFF */ else gpio_set_value(1, 1); /* set EXT_IO3 ON */ - au_sync_udelay(1); + udelay(1); return 1; } ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
I think this is no solution or not the whole solution. Sorry :) r...@openwrt:/# lspci 00:00.0 SERCOS interface: Device 0057:1800 (rev 02) 00:01.0 Non-VGA unclassified device: Device 2800:4085 (rev 02) 00:02.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:03.0 Non-VGA unclassified device: Device 2800:4085 (rev 02) 00:04.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:05.0 Non-VGA unclassified device: Device 2800:4085 (rev 02) 00:06.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:07.0 Non-VGA unclassified device: Device 2800:4085 (rev 02) 00:08.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:09.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:0a.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:0b.0 Non-VGA unclassified device: Device 2800:4085 (rev 02) 00:0c.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:0d.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:0e.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:0f.0 Non-VGA unclassified device: Device 2800:4085 (rev 02) 00:10.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:11.0 Non-VGA unclassified device: Device 2800:4085 (rev 02) 00:12.0 Non-VGA unclassified device: Device 0002: (rev 02) 00:13.0 Non-VGA unclassified device: Device 2800:4085 (rev 02) r...@openwrt:/# uname -a Linux OpenWrt 2.6.32.14 #2 Tue Jun 29 22:14:19 CEST 2010 mips GNU/Linux thanks for working on this! philipp Am Montag, den 28.06.2010, 10:18 +0200 schrieb Florian Fainelli: > 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 > 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=commitdi > > 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; > > -- > Florian > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
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 > > > > > > > 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 openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
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 > > 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=commit > > 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? 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. bruno ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
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 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=commitdi > 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; -- Florian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
Hello Manuel, On Monday 19 April 2010 10:37:42 Manuel Lauss wrote: > Florian, > > On Sat, Apr 17, 2010 at 2:23 PM, Florian Fainelli wrote: > > However, this is not the case and I need to > > bisect what was wrong from 2.6.30 to 2.6.32, this is where the problem > > started to appear. > > Looking at the changes in that timeframe, my guess would be I made some > mistakes in the gpio conversion of the mtx1 code. On the other hand in > Ticket #6851 you reported MTX1 working fine with 2.6.32, so I can't say > for sure. I tested a wrong kernel, it does not work at all with 2.6.32. > > 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. -- Florian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
Hi Manuel, Le samedi 17 avril 2010 09:34:52, Manuel Lauss a écrit : > Bruno Randolf einfach.org> writes: > > > > currently PCI is broken on the au1000 platforms. > > > > > > > > this is also the reason for: > > > > https://dev.openwrt.org/ticket/6851 > > > > > > > > in order to debug this further, does anyone know when the au1000 was > > > > > > > > working last? which kernel version? has anyone tried openwrt on > > > > au1000 recently? > > > > > > OpenWrt works fine for me on MTX-1 under 2.6.32. I know Manuel Lauss > > > did get lots of changes mainstream in-between. Will try tonight when I > > > am back home. -- > > > > well, that's good to hear :) so it can't be too serious. anyhow there > > must be a reason for https://dev.openwrt.org/ticket/6851... > > > > i'm curious to hear about your results with current openwrt trunk or > > backfire. > > I don't think this is caused by one of my patches; I don't touch PCI > because I can't test it. Nevertheless, I'd like to help fix this. > Anyone have a spare debug adapter for a MTX-1? I have a few cubes but > no means to access them so they're gathering dust ATM. I though one of the rework job that you have done could have prevented PCI from working again. However, this is not the case and I need to bisect what was wrong from 2.6.30 to 2.6.32, this is where the problem started to appear. -- Florian signature.asc Description: This is a digitally signed message part. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
Just found spare one in the cupboard. /pm me your postal addr and i'll pop it in the mail on monday Quoting Manuel Lauss : Bruno Randolf einfach.org> writes: > > currently PCI is broken on the au1000 platforms. > > > > this is also the reason for: > > https://dev.openwrt.org/ticket/6851 > > > > in order to debug this further, does anyone know when the au1000 was > > > > working last? which kernel version? has anyone tried openwrt on au1000 > > recently? > > OpenWrt works fine for me on MTX-1 under 2.6.32. I know Manuel Lauss did > get lots of changes mainstream in-between. Will try tonight when I am back > home. -- well, that's good to hear :) so it can't be too serious. anyhow there must be a reason for https://dev.openwrt.org/ticket/6851... i'm curious to hear about your results with current openwrt trunk or backfire. I don't think this is caused by one of my patches; I don't touch PCI because I can't test it. Nevertheless, I'd like to help fix this. Anyone have a spare debug adapter for a MTX-1? I have a few cubes but no means to access them so they're gathering dust ATM. Thanks! Manuel Lauss ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel -- John Crispin hacking, coding, etc blogic on irc ___ __ | |.-.-.-.| | | |..| |_ | - || _ | -__| || | | || _|| _| |___|| __|_|__|__||||__| || |__| W I R E L E S S F R E E D O M KAMIKAZE (bleeding edge) --- * 10 oz Vodka Shake well with ice and strain * 10 oz Triple sec mixture into 10 shot glasses. * 10 oz lime juice Salute! --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
Bruno Randolf einfach.org> writes: > > > currently PCI is broken on the au1000 platforms. > > > > > > this is also the reason for: > > > https://dev.openwrt.org/ticket/6851 > > > > > > in order to debug this further, does anyone know when the au1000 was > > > > > > working last? which kernel version? has anyone tried openwrt on au1000 > > > recently? > > > > OpenWrt works fine for me on MTX-1 under 2.6.32. I know Manuel Lauss did > > get lots of changes mainstream in-between. Will try tonight when I am back > > home. -- > > well, that's good to hear :) so it can't be too serious. anyhow there must be > a reason for https://dev.openwrt.org/ticket/6851... > > i'm curious to hear about your results with current openwrt trunk or backfire. I don't think this is caused by one of my patches; I don't touch PCI because I can't test it. Nevertheless, I'd like to help fix this. Anyone have a spare debug adapter for a MTX-1? I have a few cubes but no means to access them so they're gathering dust ATM. Thanks! Manuel Lauss ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
On Tuesday 06 April 2010 17:42:12 Florian Fainelli wrote: > Hi Bruno, > > On Monday 05 April 2010 03:23:49 Bruno Randolf wrote: > > hi! > > > > currently PCI is broken on the au1000 platforms. > > > > this is also the reason for: > > https://dev.openwrt.org/ticket/6851 > > > > in order to debug this further, does anyone know when the au1000 was > > > > working last? which kernel version? has anyone tried openwrt on au1000 > > recently? > > OpenWrt works fine for me on MTX-1 under 2.6.32. I know Manuel Lauss did > get lots of changes mainstream in-between. Will try tonight when I am back > home. -- well, that's good to hear :) so it can't be too serious. anyhow there must be a reason for https://dev.openwrt.org/ticket/6851... i'm curious to hear about your results with current openwrt trunk or backfire. bruno ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
Hi Bruno, On Monday 05 April 2010 03:23:49 Bruno Randolf wrote: > hi! > > currently PCI is broken on the au1000 platforms. > > this is also the reason for: > https://dev.openwrt.org/ticket/6851 > > in order to debug this further, does anyone know when the au1000 was > working last? which kernel version? has anyone tried openwrt on au1000 > recently? OpenWrt works fine for me on MTX-1 under 2.6.32. I know Manuel Lauss did get lots of changes mainstream in-between. Will try tonight when I am back home. -- Florian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] PCI broken on au1000
hi, i remember, that this happens one to tow years ago as well. at this time it was a changeset to a newer kernel between 7.07 and 7.09 ulf 2010/4/5 Bruno Randolf : > hi! > > currently PCI is broken on the au1000 platforms. > > this is also the reason for: > https://dev.openwrt.org/ticket/6851 > > in order to debug this further, does anyone know when the au1000 was working > last? which kernel version? has anyone tried openwrt on au1000 recently? > > bruno > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] PCI broken on au1000
hi! currently PCI is broken on the au1000 platforms. this is also the reason for: https://dev.openwrt.org/ticket/6851 in order to debug this further, does anyone know when the au1000 was working last? which kernel version? has anyone tried openwrt on au1000 recently? bruno ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel