* [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards
@ 2010-07-11 15:40 Bruno Randolf
2010-07-11 15:40 ` [PATCH 2/2] MIPS: MTX-1: cleanup and comments Bruno Randolf
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Bruno Randolf @ 2010-07-11 15:40 UTC (permalink / raw)
To: linux-mips, manuel.lauss, ralf; +Cc: florian
This patch fixes a regression introduced by commit "MIPS: Alchemy: MTX-1: Use
linux gpio api." (bb706b28bbd647c2fd7f22d6bf03a18b9552be05) which broke PCI bus
operation. The problem is caused by alchemy_gpio2_enable() which resets the
GPIO2 block. Two PCI signals (PCI_SERR and PCI_RST) are connected to GPIO2 and
they obviously do not to like the reset. Since GPIO2 is correctly initialized
by the boot monitor (YAMON) it is not necessary to call this function, so just
remove it.
Also replace gpio_set_value() with alchemy_gpio_set_value() to avoid problems
in case gpiolib gets initialized after PCI. And since alchemy gpio_set_value()
calls au_sync() we don't have to au_sync() again later.
Cc: stable@kernel.org
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
arch/mips/alchemy/mtx-1/board_setup.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/mips/alchemy/mtx-1/board_setup.c b/arch/mips/alchemy/mtx-1/board_setup.c
index a9f0336..52d883d 100644
--- a/arch/mips/alchemy/mtx-1/board_setup.c
+++ b/arch/mips/alchemy/mtx-1/board_setup.c
@@ -67,8 +67,6 @@ static void mtx1_power_off(void)
void __init board_setup(void)
{
- 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);
@@ -117,11 +115,11 @@ 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_set_value(1, 0); /* set EXT_IO3 OFF */
else
- gpio_set_value(1, 1); /* set EXT_IO3 ON */
+ alchemy_gpio_set_value(1, 1); /* set EXT_IO3 ON */
- au_sync_udelay(1);
+ udelay(1);
return 1;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/2] MIPS: MTX-1: cleanup and comments
2010-07-11 15:40 [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards Bruno Randolf
@ 2010-07-11 15:40 ` Bruno Randolf
2010-07-11 17:11 ` Florian Fainelli
2010-07-11 22:34 ` Ralf Baechle
2010-07-11 17:10 ` [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards Florian Fainelli
2010-07-11 22:25 ` Ralf Baechle
2 siblings, 2 replies; 6+ messages in thread
From: Bruno Randolf @ 2010-07-11 15:40 UTC (permalink / raw)
To: linux-mips, manuel.lauss, ralf; +Cc: florian
Add some comments about mtx1_pci_idsel() and remove a dead block of old code.
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
arch/mips/alchemy/mtx-1/board_setup.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/mips/alchemy/mtx-1/board_setup.c b/arch/mips/alchemy/mtx-1/board_setup.c
index 52d883d..3cf2fa2 100644
--- a/arch/mips/alchemy/mtx-1/board_setup.c
+++ b/arch/mips/alchemy/mtx-1/board_setup.c
@@ -105,14 +105,10 @@ 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
-
+ /* This function is only necessary to support a proprietary Cardbus
+ * adapter on the mtx-1 "singleboard" variant. It triggers a custom
+ * logic chip connected to EXT_IO3 (GPIO1) to suppress IDSEL signals.
+ */
if (assert && devsel != 0)
/* Suppress signal to Cardbus */
alchemy_gpio_set_value(1, 0); /* set EXT_IO3 OFF */
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/2] MIPS: MTX-1: cleanup and comments
2010-07-11 15:40 ` [PATCH 2/2] MIPS: MTX-1: cleanup and comments Bruno Randolf
@ 2010-07-11 17:11 ` Florian Fainelli
2010-07-11 22:34 ` Ralf Baechle
1 sibling, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2010-07-11 17:11 UTC (permalink / raw)
To: Bruno Randolf; +Cc: linux-mips, manuel.lauss, ralf
Le Sunday 11 July 2010 17:40:38, Bruno Randolf a écrit :
> Add some comments about mtx1_pci_idsel() and remove a dead block of old
> code.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
> ---
> arch/mips/alchemy/mtx-1/board_setup.c | 12 ++++--------
> 1 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/arch/mips/alchemy/mtx-1/board_setup.c
> b/arch/mips/alchemy/mtx-1/board_setup.c index 52d883d..3cf2fa2 100644
> --- a/arch/mips/alchemy/mtx-1/board_setup.c
> +++ b/arch/mips/alchemy/mtx-1/board_setup.c
> @@ -105,14 +105,10 @@ 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
> -
> + /* This function is only necessary to support a proprietary Cardbus
> + * adapter on the mtx-1 "singleboard" variant. It triggers a custom
> + * logic chip connected to EXT_IO3 (GPIO1) to suppress IDSEL signals.
> + */
> if (assert && devsel != 0)
> /* Suppress signal to Cardbus */
> alchemy_gpio_set_value(1, 0); /* set EXT_IO3 OFF */
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2/2] MIPS: MTX-1: cleanup and comments
2010-07-11 15:40 ` [PATCH 2/2] MIPS: MTX-1: cleanup and comments Bruno Randolf
2010-07-11 17:11 ` Florian Fainelli
@ 2010-07-11 22:34 ` Ralf Baechle
1 sibling, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2010-07-11 22:34 UTC (permalink / raw)
To: Bruno Randolf; +Cc: linux-mips, manuel.lauss, florian
Thanks, queued for 2.6.36.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards
2010-07-11 15:40 [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards Bruno Randolf
2010-07-11 15:40 ` [PATCH 2/2] MIPS: MTX-1: cleanup and comments Bruno Randolf
@ 2010-07-11 17:10 ` Florian Fainelli
2010-07-11 22:25 ` Ralf Baechle
2 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2010-07-11 17:10 UTC (permalink / raw)
To: Bruno Randolf; +Cc: linux-mips, manuel.lauss, ralf
Le Sunday 11 July 2010 17:40:28, Bruno Randolf a écrit :
> This patch fixes a regression introduced by commit "MIPS: Alchemy: MTX-1:
> Use linux gpio api." (bb706b28bbd647c2fd7f22d6bf03a18b9552be05) which
> broke PCI bus operation. The problem is caused by alchemy_gpio2_enable()
> which resets the GPIO2 block. Two PCI signals (PCI_SERR and PCI_RST) are
> connected to GPIO2 and they obviously do not to like the reset. Since
> GPIO2 is correctly initialized by the boot monitor (YAMON) it is not
> necessary to call this function, so just remove it.
>
> Also replace gpio_set_value() with alchemy_gpio_set_value() to avoid
> problems in case gpiolib gets initialized after PCI. And since alchemy
> gpio_set_value() calls au_sync() we don't have to au_sync() again later.
>
> Cc: stable@kernel.org
> Signed-off-by: Bruno Randolf <br1@einfach.org>
Tested-by: Florian Fainelli <florian@openwrt.org>
> ---
> arch/mips/alchemy/mtx-1/board_setup.c | 8 +++-----
> 1 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/mips/alchemy/mtx-1/board_setup.c
> b/arch/mips/alchemy/mtx-1/board_setup.c index a9f0336..52d883d 100644
> --- a/arch/mips/alchemy/mtx-1/board_setup.c
> +++ b/arch/mips/alchemy/mtx-1/board_setup.c
> @@ -67,8 +67,6 @@ static void mtx1_power_off(void)
>
> void __init board_setup(void)
> {
> - 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);
> @@ -117,11 +115,11 @@ 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_set_value(1, 0); /* set EXT_IO3 OFF */
> else
> - gpio_set_value(1, 1); /* set EXT_IO3 ON */
> + alchemy_gpio_set_value(1, 1); /* set EXT_IO3 ON */
>
> - au_sync_udelay(1);
> + udelay(1);
> return 1;
> }
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards
2010-07-11 15:40 [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards Bruno Randolf
2010-07-11 15:40 ` [PATCH 2/2] MIPS: MTX-1: cleanup and comments Bruno Randolf
2010-07-11 17:10 ` [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards Florian Fainelli
@ 2010-07-11 22:25 ` Ralf Baechle
2 siblings, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2010-07-11 22:25 UTC (permalink / raw)
To: Bruno Randolf; +Cc: linux-mips, manuel.lauss, florian
On Mon, Jul 12, 2010 at 12:40:28AM +0900, Bruno Randolf wrote:
> Cc: stable@kernel.org
Thanks, applied - but stable wasn't on the Cc: list!
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-07-11 22:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-11 15:40 [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards Bruno Randolf
2010-07-11 15:40 ` [PATCH 2/2] MIPS: MTX-1: cleanup and comments Bruno Randolf
2010-07-11 17:11 ` Florian Fainelli
2010-07-11 22:34 ` Ralf Baechle
2010-07-11 17:10 ` [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards Florian Fainelli
2010-07-11 22:25 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.