From: Florian Fainelli <florian@openwrt.org>
To: Bruno Randolf <randolf.bruno@googlemail.com>
Cc: linux-mips@linux-mips.org, manuel.lauss@googlemail.com,
ralf@linux-mips.org
Subject: Re: [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards
Date: Sun, 11 Jul 2010 19:10:20 +0200 [thread overview]
Message-ID: <201007111910.22303.florian@openwrt.org> (raw)
In-Reply-To: <20100711154028.29863.74414.stgit@void>
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;
> }
next prev parent reply other threads:[~2010-07-11 17:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Florian Fainelli [this message]
2010-07-11 22:25 ` [PATCH 1/2] MIPS: MTX-1: fix PCI on the MeshCube and related boards Ralf Baechle
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=201007111910.22303.florian@openwrt.org \
--to=florian@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=manuel.lauss@googlemail.com \
--cc=ralf@linux-mips.org \
--cc=randolf.bruno@googlemail.com \
/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 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.