linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal
@ 2013-06-18  8:51 Lee Jones
  2013-06-18  8:51 ` [PATCH 1/3] ARM: ux500: Provide a AB8500 GPIO Device Tree node Lee Jones
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Lee Jones @ 2013-06-18  8:51 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel; +Cc: arnd, linus.walleij, srinidhi.kasagar

Arnd,

As requested by you, this gets rid of  mop500_snowball_ethernet_clock_enable()
which is no longer in use. It also straightens out a bug which ensures the
SMSC911x's regulator is turned on at start-up when using Device Tree.

This is based on your test-merge-20130615 branch.

Kind regards,
Lee

 arch/arm/boot/dts/dbx5x0.dtsi      |  5 +++++
 arch/arm/boot/dts/snowball.dts     | 13 +++++++------
 arch/arm/mach-ux500/board-mop500.c | 11 -----------
 arch/arm/mach-ux500/board-mop500.h |  1 -
 arch/arm/mach-ux500/cpu-db8500.c   |  1 -
 5 files changed, 12 insertions(+), 19 deletions(-)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] ARM: ux500: Provide a AB8500 GPIO Device Tree node
  2013-06-18  8:51 [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal Lee Jones
@ 2013-06-18  8:51 ` Lee Jones
  2013-06-18  8:51 ` [PATCH 2/3] ARM: ux500: Correct the EN_3v3 regulator's on/off GPIO Lee Jones
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-06-18  8:51 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, linus.walleij, srinidhi.kasagar, Lee Jones

Here we're adding a node for the AB8500 GPIO device. This will allow
other DT:ed components to obtain GPIOs for use within their drivers.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/dbx5x0.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index a082f0b..a152945 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -360,6 +360,11 @@
 				interrupt-controller;
 				#interrupt-cells = <2>;
 
+				ab8500_gpio: ab8500-gpio {
+					gpio-controller;
+					#gpio-cells = <2>;
+				};
+
 				ab8500-rtc {
 					compatible = "stericsson,ab8500-rtc";
 					interrupts = <17 IRQ_TYPE_LEVEL_HIGH
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] ARM: ux500: Correct the EN_3v3 regulator's on/off GPIO
  2013-06-18  8:51 [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal Lee Jones
  2013-06-18  8:51 ` [PATCH 1/3] ARM: ux500: Provide a AB8500 GPIO Device Tree node Lee Jones
@ 2013-06-18  8:51 ` Lee Jones
  2013-06-18 13:12   ` Arnd Bergmann
  2013-06-18  8:51 ` [PATCH 3/3] ARM: ux500: Remove mop500_snowball_ethernet_clock_enable() Lee Jones
  2013-06-18  9:14 ` [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal Linus Walleij
  3 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2013-06-18  8:51 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, linus.walleij, srinidhi.kasagar, Lee Jones

When this node was added, the AB8500 GPIO driver was pretty broken.
As a hack, we pretended that NOMADIK GPIO 26 was the correct on/off
pin, as it was unused. It worked because AB8500 GPIO 26 was in an
'always on from boot' state. Now the AB8500 GPIO driver is working,
the default state for all the pins is 'off'. Let's flip back over to
use the correct GPIO which is _actually_ attached to the regulator.

We're also taking the opportunity to straighten out some formatting
misdemeanours, swapping spaces for tabs.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/snowball.dts | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts
index fb9dce5..49824be 100644
--- a/arch/arm/boot/dts/snowball.dts
+++ b/arch/arm/boot/dts/snowball.dts
@@ -22,12 +22,13 @@
 
 	en_3v3_reg: en_3v3 {
 		compatible = "regulator-fixed";
-                regulator-name = "en-3v3-fixed-supply";
-                regulator-min-microvolt = <3300000>;
-                regulator-max-microvolt = <3300000>;
-                gpios = <&gpio0 26  0x4>; // 26
-                startup-delay-us = <5000>;
-                enable-active-high;
+		regulator-name = "en-3v3-fixed-supply";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		/* AB8500 GPIOs start from 1 - offset 25 is GPIO26. */
+		gpio = <&ab8500_gpio 25 0x4>;
+		startup-delay-us = <5000>;
+		enable-active-high;
 	};
 
 	gpio_keys {
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] ARM: ux500: Remove mop500_snowball_ethernet_clock_enable()
  2013-06-18  8:51 [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal Lee Jones
  2013-06-18  8:51 ` [PATCH 1/3] ARM: ux500: Provide a AB8500 GPIO Device Tree node Lee Jones
  2013-06-18  8:51 ` [PATCH 2/3] ARM: ux500: Correct the EN_3v3 regulator's on/off GPIO Lee Jones
@ 2013-06-18  8:51 ` Lee Jones
  2013-06-18  9:14 ` [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal Linus Walleij
  3 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-06-18  8:51 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: arnd, linus.walleij, srinidhi.kasagar, Lee Jones

mop500_snowball_ethernet_clock_enable() provided a means to enable a
clock which was used for the SMSC911x Ethernet device on Snowball. It
was merely a stand-in until the driver was common clk compliant. Now
that it is, this can be removed for both DT and ATAGs booting.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/mach-ux500/board-mop500.c | 11 -----------
 arch/arm/mach-ux500/board-mop500.h |  1 -
 arch/arm/mach-ux500/cpu-db8500.c   |  1 -
 3 files changed, 13 deletions(-)

diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 238b237..f7a1feb 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -419,15 +419,6 @@ static void mop500_prox_deactivate(struct device *dev)
 }
 #endif
 
-void mop500_snowball_ethernet_clock_enable(void)
-{
-	struct clk *clk;
-
-	clk = clk_get_sys("fsmc", NULL);
-	if (!IS_ERR(clk))
-		clk_prepare_enable(clk);
-}
-
 #ifdef CONFIG_ATAGS
 static struct cryp_platform_data u8500_cryp1_platform_data = {
 		.mem_to_engine = {
@@ -644,8 +635,6 @@ static void __init snowball_init_machine(void)
 	mop500_audio_init(parent);
 	mop500_uart_init(parent);
 
-	mop500_snowball_ethernet_clock_enable();
-
 	u8500_cryp1_hash1_init(parent);
 
 	/* This board has full regulator constraints */
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index 6f0bfcb..d6fab16 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -105,7 +105,6 @@ void __init mop500_pinmaps_init(void);
 void __init snowball_pinmaps_init(void);
 void __init hrefv60_pinmaps_init(void);
 void mop500_audio_init(struct device *parent);
-void mop500_snowball_ethernet_clock_enable(void);
 
 int __init mop500_uib_init(void);
 void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 084f104..1472dde 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -300,7 +300,6 @@ static void __init u8500_init_machine(void)
 		mop500_pinmaps_init();
 	else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
 		snowball_pinmaps_init();
-		mop500_snowball_ethernet_clock_enable();
 	} else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
 		hrefv60_pinmaps_init();
 	else if (of_machine_is_compatible("st-ericsson,ccu9540")) {}
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal
  2013-06-18  8:51 [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal Lee Jones
                   ` (2 preceding siblings ...)
  2013-06-18  8:51 ` [PATCH 3/3] ARM: ux500: Remove mop500_snowball_ethernet_clock_enable() Lee Jones
@ 2013-06-18  9:14 ` Linus Walleij
  2013-06-21 12:48   ` Arnd Bergmann
  3 siblings, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2013-06-18  9:14 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann, Linus WALLEIJ,
	Srinidhi KASAGAR

On Tue, Jun 18, 2013 at 10:51 AM, Lee Jones <lee.jones@linaro.org> wrote:

> As requested by you, this gets rid of  mop500_snowball_ethernet_clock_enable()
> which is no longer in use. It also straightens out a bug which ensures the
> SMSC911x's regulator is turned on at start-up when using Device Tree.
>
> This is based on your test-merge-20130615 branch.

All are Acked-by: Linus Walleij <linus.walleij@linaro.org>

I suggest the ARM SoC folks merge these three patches directly.
I've queued 1/3 and 2/3 on my devicetree branch so they won't
be lost, but 3/3 does not apply on any of my branches, it
needs to be applied directly on some ARM SoC baseline.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] ARM: ux500: Correct the EN_3v3 regulator's on/off GPIO
  2013-06-18  8:51 ` [PATCH 2/3] ARM: ux500: Correct the EN_3v3 regulator's on/off GPIO Lee Jones
@ 2013-06-18 13:12   ` Arnd Bergmann
  2013-06-18 13:22     ` Lee Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2013-06-18 13:12 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-kernel, linus.walleij, srinidhi.kasagar

On Tuesday 18 June 2013, Lee Jones wrote:
> -                gpios = <&gpio0 26  0x4>; // 26
> -                startup-delay-us = <5000>;
> -                enable-active-high;
> +               regulator-name = "en-3v3-fixed-supply";
> +               regulator-min-microvolt = <3300000>;
> +               regulator-max-microvolt = <3300000>;
> +               /* AB8500 GPIOs start from 1 - offset 25 is GPIO26. */
> +               gpio = <&ab8500_gpio 25 0x4>;

Is it intentional that you had "gpios" before and "gpio" after the change
as the property name?

	Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] ARM: ux500: Correct the EN_3v3 regulator's on/off GPIO
  2013-06-18 13:12   ` Arnd Bergmann
@ 2013-06-18 13:22     ` Lee Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-06-18 13:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, linux-kernel, linus.walleij, srinidhi.kasagar

On Tue, 18 Jun 2013, Arnd Bergmann wrote:

> On Tuesday 18 June 2013, Lee Jones wrote:
> > -                gpios = <&gpio0 26  0x4>; // 26
> > -                startup-delay-us = <5000>;
> > -                enable-active-high;
> > +               regulator-name = "en-3v3-fixed-supply";
> > +               regulator-min-microvolt = <3300000>;
> > +               regulator-max-microvolt = <3300000>;
> > +               /* AB8500 GPIOs start from 1 - offset 25 is GPIO26. */
> > +               gpio = <&ab8500_gpio 25 0x4>;
> 
> Is it intentional that you had "gpios" before and "gpio" after the change
> as the property name?

Yes, it's intentional. See: drivers/regulator/fixed.c

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal
  2013-06-18  9:14 ` [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal Linus Walleij
@ 2013-06-21 12:48   ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2013-06-21 12:48 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Lee Jones, linux-arm-kernel, linux-kernel, Linus WALLEIJ,
	Srinidhi KASAGAR

On Tuesday 18 June 2013, Linus Walleij wrote:
> On Tue, Jun 18, 2013 at 10:51 AM, Lee Jones <lee.jones@linaro.org> wrote:
> 
> > As requested by you, this gets rid of  mop500_snowball_ethernet_clock_enable()
> > which is no longer in use. It also straightens out a bug which ensures the
> > SMSC911x's regulator is turned on at start-up when using Device Tree.
> >
> > This is based on your test-merge-20130615 branch.
> 
> All are Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> I suggest the ARM SoC folks merge these three patches directly.
> I've queued 1/3 and 2/3 on my devicetree branch so they won't
> be lost, but 3/3 does not apply on any of my branches, it
> needs to be applied directly on some ARM SoC baseline.
> 

Applied to next/drivers, thanks!

	Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-21 12:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-18  8:51 [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal Lee Jones
2013-06-18  8:51 ` [PATCH 1/3] ARM: ux500: Provide a AB8500 GPIO Device Tree node Lee Jones
2013-06-18  8:51 ` [PATCH 2/3] ARM: ux500: Correct the EN_3v3 regulator's on/off GPIO Lee Jones
2013-06-18 13:12   ` Arnd Bergmann
2013-06-18 13:22     ` Lee Jones
2013-06-18  8:51 ` [PATCH 3/3] ARM: ux500: Remove mop500_snowball_ethernet_clock_enable() Lee Jones
2013-06-18  9:14 ` [PATCH 0/3] ARM: ux500: mop500_snowball_ethernet_clock_enable() removal Linus Walleij
2013-06-21 12:48   ` Arnd Bergmann

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).