* [PATCH 2/2] bcm63xx: only set the proper GPIO overlay settings
@ 2009-08-31 18:28 Florian Fainelli
2009-08-31 20:26 ` Maxime Bizon
0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2009-08-31 18:28 UTC (permalink / raw)
To: ralf Baechle; +Cc: linux-mips, Maxime Bizon
This patch makes the GPIO pin multiplexing configuration
read the initial GPIO mode register value instead of
setting it initially to 0, then setting the correct
bits, this is safer.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index cfe32af..6ae4242 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -634,7 +634,7 @@ void __init board_prom_init(void)
/* setup pin multiplexing depending on board enabled device,
* this has to be done this early since PCI init is done
* inside arch_initcall */
- val = 0;
+ val = bcm_gpio_readl(GPIO_MODE_REG);
#ifdef CONFIG_PCI
if (board.has_pci) {
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] bcm63xx: only set the proper GPIO overlay settings
2009-08-31 18:28 [PATCH 2/2] bcm63xx: only set the proper GPIO overlay settings Florian Fainelli
@ 2009-08-31 20:26 ` Maxime Bizon
2009-08-31 21:37 ` Florian Fainelli
0 siblings, 1 reply; 5+ messages in thread
From: Maxime Bizon @ 2009-08-31 20:26 UTC (permalink / raw)
To: Florian Fainelli; +Cc: ralf Baechle, linux-mips
On Mon, 2009-08-31 at 20:28 +0200, Florian Fainelli wrote:
> This patch makes the GPIO pin multiplexing configuration
> read the initial GPIO mode register value instead of
> setting it initially to 0, then setting the correct
> bits, this is safer.
I disagree, now we get working or not working devices depending on the
CFE version used, for which we don't have any public source code nor
changelog.
I cleared the register for that purpose.
If a particular pin muxing config is needed for some board, we should
add this to the board specific struct instead.
--
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] bcm63xx: only set the proper GPIO overlay settings
2009-08-31 20:26 ` Maxime Bizon
@ 2009-08-31 21:37 ` Florian Fainelli
2009-10-11 22:53 ` Ralf Baechle
0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2009-08-31 21:37 UTC (permalink / raw)
To: mbizon; +Cc: ralf Baechle, linux-mips
[-- Attachment #1: Type: text/plain, Size: 956 bytes --]
Le lundi 31 août 2009 22:26:29, Maxime Bizon a écrit :
> On Mon, 2009-08-31 at 20:28 +0200, Florian Fainelli wrote:
> > This patch makes the GPIO pin multiplexing configuration
> > read the initial GPIO mode register value instead of
> > setting it initially to 0, then setting the correct
> > bits, this is safer.
>
> I disagree, now we get working or not working devices depending on the
> CFE version used, for which we don't have any public source code nor
> changelog.
I did not think this could break other boards, it is required on BCM6345
though.
>
> I cleared the register for that purpose.
>
> If a particular pin muxing config is needed for some board, we should
> add this to the board specific struct instead.
Then I will make it BCM6345 specific.
Thanks.
--
Best regards, Florian Fainelli
Email: florian@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
-------------------------------
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 201 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] bcm63xx: only set the proper GPIO overlay settings
2009-08-31 21:37 ` Florian Fainelli
@ 2009-10-11 22:53 ` Ralf Baechle
2009-10-12 16:12 ` Florian Fainelli
0 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2009-10-11 22:53 UTC (permalink / raw)
To: Florian Fainelli; +Cc: mbizon, linux-mips
On Mon, Aug 31, 2009 at 11:37:31PM +0200, Florian Fainelli wrote:
> Le lundi 31 août 2009 22:26:29, Maxime Bizon a écrit :
> > On Mon, 2009-08-31 at 20:28 +0200, Florian Fainelli wrote:
> > > This patch makes the GPIO pin multiplexing configuration
> > > read the initial GPIO mode register value instead of
> > > setting it initially to 0, then setting the correct
> > > bits, this is safer.
> >
> > I disagree, now we get working or not working devices depending on the
> > CFE version used, for which we don't have any public source code nor
> > changelog.
>
> I did not think this could break other boards, it is required on BCM6345
> though.
>
> >
> > I cleared the register for that purpose.
> >
> > If a particular pin muxing config is needed for some board, we should
> > add this to the board specific struct instead.
>
> Then I will make it BCM6345 specific.
I thought you were going to send an update to this?
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] bcm63xx: only set the proper GPIO overlay settings
2009-10-11 22:53 ` Ralf Baechle
@ 2009-10-12 16:12 ` Florian Fainelli
0 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2009-10-12 16:12 UTC (permalink / raw)
To: Ralf Baechle; +Cc: mbizon, linux-mips
On Monday 12 October 2009 00:53:20 Ralf Baechle wrote:
> On Mon, Aug 31, 2009 at 11:37:31PM +0200, Florian Fainelli wrote:
> > Le lundi 31 août 2009 22:26:29, Maxime Bizon a écrit :
> > > On Mon, 2009-08-31 at 20:28 +0200, Florian Fainelli wrote:
> > > > This patch makes the GPIO pin multiplexing configuration
> > > > read the initial GPIO mode register value instead of
> > > > setting it initially to 0, then setting the correct
> > > > bits, this is safer.
> > >
> > > I disagree, now we get working or not working devices depending on the
> > > CFE version used, for which we don't have any public source code nor
> > > changelog.
> >
> > I did not think this could break other boards, it is required on BCM6345
> > though.
> >
> > > I cleared the register for that purpose.
> > >
> > > If a particular pin muxing config is needed for some board, we should
> > > add this to the board specific struct instead.
> >
> > Then I will make it BCM6345 specific.
>
> I thought you were going to send an update to this?
Not at the moment, the user who reported that issue though it was related to
that and I also saw a potential for breaking BCM6345 GPIO config, but since
that one has a totally different GPIO registers layout it needs a bigger fix
which deals with different registers.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-10-12 16:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-31 18:28 [PATCH 2/2] bcm63xx: only set the proper GPIO overlay settings Florian Fainelli
2009-08-31 20:26 ` Maxime Bizon
2009-08-31 21:37 ` Florian Fainelli
2009-10-11 22:53 ` Ralf Baechle
2009-10-12 16:12 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).