With other Orion SoCs moving to DT enabled pinctrl and gpio drivers,
now also move Dove to them. This patch set first fixes some issues
introduced during the first release of dove pinctrl and now. Then it
moves Dove to DT pinctrl and gpio and enables a gpio led pinhog for
CuBox.
This patch relies on a patch set for mvebu pinctrl taken through
Linus' pinctrl branch. As there is no other platform than Dove
involved, I suggest to take it though Jason's tree to avoid any
further conflicts.
Axel Lin (1):
pinctrl: mvebu: Fix dove_audio1_ctrl_set function
Sebastian Hesselbarth (3):
pinctrl: mvebu: fix iomem pointer for dove pinctrl
ARM: Dove: Convert to DT GPIO and pinctrl
ARM: Dove: Add CuBox pinhog for led
arch/arm/Kconfig | 2 ++
arch/arm/boot/dts/dove-cubox.dts | 10 ++++++++++
arch/arm/boot/dts/dove.dtsi | 20 +++++++++++++++++---
drivers/pinctrl/mvebu/pinctrl-dove.c | 22 +++++++++++++++-------
4 files changed, 44 insertions(+), 10 deletions(-)
---
Cc: Russell King <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Axel Lin <[email protected]>
Cc: [email protected]
Cc: [email protected]
--
1.7.10.4
From: Axel Lin <[email protected]>
When setting audio1 pinmux the bits in the corresponding registers
are not cleared. This fix first clears all bits and then sets the
required bits according to the selected function.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Sebastian Hesselbarth <[email protected]>
---
Cc: Russell King <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Axel Lin <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/pinctrl/mvebu/pinctrl-dove.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c
index 34693f6..40c9c3e 100644
--- a/drivers/pinctrl/mvebu/pinctrl-dove.c
+++ b/drivers/pinctrl/mvebu/pinctrl-dove.c
@@ -234,6 +234,14 @@ static int dove_audio1_ctrl_set(struct mvebu_mpp_ctrl *ctrl,
unsigned long gmpp = readl(DOVE_MPP_GENERAL_VIRT_BASE);
unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2);
+ /*
+ * clear all audio1 related bits before configure
+ */
+ gcfg2 &= ~DOVE_TWSI_OPTION3_GPIO;
+ gmpp &= ~DOVE_AU1_SPDIFO_GPIO_EN;
+ sspc1 &= ~DOVE_SSP_ON_AU1;
+ mpp4 &= ~DOVE_AU1_GPIO_SEL;
+
if (config & BIT(0))
gcfg2 |= DOVE_TWSI_OPTION3_GPIO;
if (config & BIT(1))
--
1.7.10.4
SolidRun CuBox has a led on a gpio pin. As there is now DT pinctrl
support for Dove, make use of a pinhog to ensure the pin is set to
gpio.
Signed-off-by: Sebastian Hesselbarth <[email protected]>
---
Cc: Russell King <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Axel Lin <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
arch/arm/boot/dts/dove-cubox.dts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts
index 0adbd5a..fed7d3f 100644
--- a/arch/arm/boot/dts/dove-cubox.dts
+++ b/arch/arm/boot/dts/dove-cubox.dts
@@ -40,3 +40,13 @@
reg = <0>;
};
};
+
+&pinctrl {
+ pinctrl-0 = <&pmx_gpio_18>;
+ pinctrl-names = "default";
+
+ pmx_gpio_18: pmx-gpio-18 {
+ marvell,pins = "mpp18";
+ marvell,function = "gpio";
+ };
+};
--
1.7.10.4
Following the ongoing conversion of Orion SoCs to DT, make use of
gpio and pinctrl drivers through DT. The main dtsi for Dove is prepared
to allow board specific descriptors to make use of pinctrl muxing.
Signed-off-by: Sebastian Hesselbarth <[email protected]>
---
Cc: Russell King <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Axel Lin <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
arch/arm/Kconfig | 2 ++
arch/arm/boot/dts/dove.dtsi | 20 +++++++++++++++++---
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d5a28da..bb9a85d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -539,6 +539,8 @@ config ARCH_DOVE
select CPU_V7
select GENERIC_CLOCKEVENTS
select MIGHT_HAVE_PCI
+ select PINCTRL
+ select PINCTRL_DOVE
select PLAT_ORION_LEGACY
select USB_ARCH_HAS_EHCI
help
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index 8c8ab62..c457480 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -4,6 +4,12 @@
compatible = "marvell,dove";
model = "Marvell Armada 88AP510 SoC";
+ aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ };
+
soc@f1000000 {
compatible = "simple-bus";
#address-cells = <1>;
@@ -85,7 +91,8 @@
#gpio-cells = <2>;
gpio-controller;
reg = <0xd0400 0x20>;
- ngpio = <32>;
+ ngpios = <32>;
+ interrupt-controller;
interrupts = <12>, <13>, <14>, <60>;
};
@@ -94,7 +101,8 @@
#gpio-cells = <2>;
gpio-controller;
reg = <0xd0420 0x20>;
- ngpio = <32>;
+ ngpios = <32>;
+ interrupt-controller;
interrupts = <61>;
};
@@ -103,7 +111,13 @@
#gpio-cells = <2>;
gpio-controller;
reg = <0xe8400 0x0c>;
- ngpio = <8>;
+ ngpios = <8>;
+ };
+
+ pinctrl: pinctrl@d0200 {
+ compatible = "marvell,dove-pinctrl";
+ reg = <0xd0200 0x10>;
+ clocks = <&gate_clk 22>;
};
spi0: spi@10600 {
--
1.7.10.4
There has been a change in readl/writel to require registers
addresses marked as IOMEM(). This patch takes care of this and
also replaces ORing address offsets with adding them.
Signed-off-by: Sebastian Hesselbarth <[email protected]>
---
Cc: Russell King <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Axel Lin <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/pinctrl/mvebu/pinctrl-dove.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c
index ffe74b2..34693f6 100644
--- a/drivers/pinctrl/mvebu/pinctrl-dove.c
+++ b/drivers/pinctrl/mvebu/pinctrl-dove.c
@@ -22,22 +22,22 @@
#include "pinctrl-mvebu.h"
-#define DOVE_SB_REGS_VIRT_BASE 0xfde00000
-#define DOVE_MPP_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0200)
+#define DOVE_SB_REGS_VIRT_BASE IOMEM(0xfde00000)
+#define DOVE_MPP_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0200)
#define DOVE_PMU_MPP_GENERAL_CTRL (DOVE_MPP_VIRT_BASE + 0x10)
#define DOVE_AU0_AC97_SEL BIT(16)
-#define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE | 0xe802C)
+#define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE + 0xe802C)
#define DOVE_TWSI_ENABLE_OPTION1 BIT(7)
-#define DOVE_GLOBAL_CONFIG_2 (DOVE_SB_REGS_VIRT_BASE | 0xe8030)
+#define DOVE_GLOBAL_CONFIG_2 (DOVE_SB_REGS_VIRT_BASE + 0xe8030)
#define DOVE_TWSI_ENABLE_OPTION2 BIT(20)
#define DOVE_TWSI_ENABLE_OPTION3 BIT(21)
#define DOVE_TWSI_OPTION3_GPIO BIT(22)
-#define DOVE_SSP_CTRL_STATUS_1 (DOVE_SB_REGS_VIRT_BASE | 0xe8034)
+#define DOVE_SSP_CTRL_STATUS_1 (DOVE_SB_REGS_VIRT_BASE + 0xe8034)
#define DOVE_SSP_ON_AU1 BIT(0)
-#define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe803c)
+#define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xe803c)
#define DOVE_AU1_SPDIFO_GPIO_EN BIT(1)
#define DOVE_NAND_GPIO_EN BIT(0)
-#define DOVE_GPIO_LO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0400)
+#define DOVE_GPIO_LO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE + 0xd0400)
#define DOVE_MPP_CTRL4_VIRT_BASE (DOVE_GPIO_LO_VIRT_BASE + 0x40)
#define DOVE_SPI_GPIO_SEL BIT(5)
#define DOVE_UART1_GPIO_SEL BIT(4)
--
1.7.10.4
Dear Sebastian Hesselbarth,
On Mon, 19 Nov 2012 10:39:53 +0100, Sebastian Hesselbarth wrote:
> There has been a change in readl/writel to require registers
> addresses marked as IOMEM(). This patch takes care of this and
> also replaces ORing address offsets with adding them.
>
> Signed-off-by: Sebastian Hesselbarth <[email protected]>
> ---
> Cc: Russell King <[email protected]>
> Cc: Linus Walleij <[email protected]>
> Cc: Sebastian Hesselbarth <[email protected]>
> Cc: Jason Cooper <[email protected]>
> Cc: Andrew Lunn <[email protected]>
> Cc: Thomas Petazzoni <[email protected]>
> Cc: Gregory CLEMENT <[email protected]>
> Cc: Axel Lin <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> drivers/pinctrl/mvebu/pinctrl-dove.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
Acked-by: Thomas Petazzoni <[email protected]>
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
On Mon, Nov 19, 2012 at 10:39 AM, Sebastian Hesselbarth
<[email protected]> wrote:
> This patch relies on a patch set for mvebu pinctrl taken through
> Linus' pinctrl branch. As there is no other platform than Dove
> involved, I suggest to take it though Jason's tree to avoid any
> further conflicts.
Sounds like a plan. So you have some commit history pulled
in from the pinctrl tree in the MVEBU tree?
Yours,
Linus Walleij
On Mon, Nov 19, 2012 at 10:39 AM, Sebastian Hesselbarth
<[email protected]> wrote:
> There has been a change in readl/writel to require registers
> addresses marked as IOMEM(). This patch takes care of this and
> also replaces ORing address offsets with adding them.
>
> Signed-off-by: Sebastian Hesselbarth <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Yours,
Linus Walleij
On Mon, Nov 19, 2012 at 10:39 AM, Sebastian Hesselbarth
<[email protected]> wrote:
> From: Axel Lin <[email protected]>
>
> When setting audio1 pinmux the bits in the corresponding registers
> are not cleared. This fix first clears all bits and then sets the
> required bits according to the selected function.
>
> Signed-off-by: Axel Lin <[email protected]>
> Signed-off-by: Sebastian Hesselbarth <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Yours,
Linus Walleij
On 11/21/2012 10:59 AM, Linus Walleij wrote:
> On Mon, Nov 19, 2012 at 10:39 AM, Sebastian Hesselbarth
> <[email protected]> wrote:
>> This patch relies on a patch set for mvebu pinctrl taken through
>> Linus' pinctrl branch. As there is no other platform than Dove
>> involved, I suggest to take it though Jason's tree to avoid any
>> further conflicts.
>
> Sounds like a plan. So you have some commit history pulled
> in from the pinctrl tree in the MVEBU tree?
Linus,
I am referring to patches for a pinctrl/mvebu subfolder. IIRC Thomas
posted that patch a while ago. Jason is currently sorting things out
for mvebu pull requests. I guess both can comment on your question,
as I don't fully understand it.
Sebastian
On Wed, Nov 21, 2012 at 11:20 AM, Sebastian Hesselbarth
<[email protected]> wrote:
> On 11/21/2012 10:59 AM, Linus Walleij wrote:
>>
>> On Mon, Nov 19, 2012 at 10:39 AM, Sebastian Hesselbarth
>> <[email protected]> wrote:
>>>
>>> This patch relies on a patch set for mvebu pinctrl taken through
>>> Linus' pinctrl branch. As there is no other platform than Dove
>>> involved, I suggest to take it though Jason's tree to avoid any
>>> further conflicts.
>>
>>
>> Sounds like a plan. So you have some commit history pulled
>> in from the pinctrl tree in the MVEBU tree?
>
>
> Linus,
>
> I am referring to patches for a pinctrl/mvebu subfolder. IIRC Thomas
> posted that patch a while ago. Jason is currently sorting things out
> for mvebu pull requests. I guess both can comment on your question,
> as I don't fully understand it.
So what I mean is that the patches creating pinctrl/mvebu is in the
pinctrl tree, so if patches in the MVEBU tree depend on these,
then it must have pulled in a branch from pinctrl or applied the
same patches in that tree too (which is OK *sometimes*).
Yours,
Linus Walleij
Linus,
On Wed, 21 Nov 2012 15:45:42 +0100, Linus Walleij wrote:
> > I am referring to patches for a pinctrl/mvebu subfolder. IIRC Thomas
> > posted that patch a while ago. Jason is currently sorting things out
> > for mvebu pull requests. I guess both can comment on your question,
> > as I don't fully understand it.
>
> So what I mean is that the patches creating pinctrl/mvebu is in the
> pinctrl tree, so if patches in the MVEBU tree depend on these,
> then it must have pulled in a branch from pinctrl or applied the
> same patches in that tree too (which is OK *sometimes*).
I know there has been some discussion between Arnd and Jason Cooper
(who handles the pull requests for the overall mvebu effort) about this
specific topic. I think the outcome of the discussion was that Jason
would have to see how much the rest of the mvebu stuff depends on this
pinctrl/mvebu change and will see with Arnd how to proceed. But it's
certainly better if Jason gives you directly feedback about this.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Linus,
On Wed, Nov 21, 2012 at 03:45:42PM +0100, Linus Walleij wrote:
> On Wed, Nov 21, 2012 at 11:20 AM, Sebastian Hesselbarth <[email protected]> wrote:
> > On 11/21/2012 10:59 AM, Linus Walleij wrote:
> >> On Mon, Nov 19, 2012 at 10:39 AM, Sebastian Hesselbarth <[email protected]> wrote:
> >>> This patch relies on a patch set for mvebu pinctrl taken through
> >>> Linus' pinctrl branch. As there is no other platform than Dove
> >>> involved, I suggest to take it though Jason's tree to avoid any
> >>> further conflicts.
> >>
> >> Sounds like a plan. So you have some commit history pulled
> >> in from the pinctrl tree in the MVEBU tree?
> >
> > I am referring to patches for a pinctrl/mvebu subfolder. IIRC Thomas
> > posted that patch a while ago. Jason is currently sorting things out
> > for mvebu pull requests. I guess both can comment on your question,
> > as I don't fully understand it.
>
> So what I mean is that the patches creating pinctrl/mvebu is in the
> pinctrl tree, so if patches in the MVEBU tree depend on these,
> then it must have pulled in a branch from pinctrl or applied the
> same patches in that tree too (which is OK *sometimes*).
Yes, Thomas and Gregory informed me of the pinctrl dependency and said
they were using for-next from the pinctrl tree. I've used that branch
to merge and build successfully. Is that ok in practice or is there a
more specific branch I should pull in as a dependency?
thx,
Jason.
On Wed, Nov 21, 2012 at 4:52 PM, Jason Cooper <[email protected]> wrote:
> On Wed, Nov 21, 2012 at 03:45:42PM +0100, Linus Walleij wrote:
>> So what I mean is that the patches creating pinctrl/mvebu is in the
>> pinctrl tree, so if patches in the MVEBU tree depend on these,
>> then it must have pulled in a branch from pinctrl or applied the
>> same patches in that tree too (which is OK *sometimes*).
>
> Yes, Thomas and Gregory informed me of the pinctrl dependency and said
> they were using for-next from the pinctrl tree. I've used that branch
> to merge and build successfully. Is that ok in practice or is there a
> more specific branch I should pull in as a dependency?
Do not use for-next. That is a mix-down for the linux-next tree.
It is basically created like this:
git checkout for-next
git reset --hard fixes
git merge devel
fixes will be based on the latest release candidate and devel on
something older like -rc1, -rc2.
If you pull something in it must be from the devel branch.
The ebst idea is to take the last commit in the devel branch
that you need, so the last mvebu commit in that branch.
This is what the ARM SoC guys usually does.
So: git pull <pinctrl tree> devel
git log ...
<find the commit you need e.g 10930572>
git checkout -b my-new-mvebu-stuff 10930572
So you branch off where you have the deps you
need.
That way I can still reorder patches *above* that
commit (not that I should, but sometimes we discover
commits that are not bisectable and such exceptions).
The result can the be pulled into my tree or ARM SoC
or similar.
Linus Walleij
On Fri, Nov 23, 2012 at 08:49:04AM +0100, Linus Walleij wrote:
> On Wed, Nov 21, 2012 at 4:52 PM, Jason Cooper <[email protected]> wrote:
> > On Wed, Nov 21, 2012 at 03:45:42PM +0100, Linus Walleij wrote:
>
> >> So what I mean is that the patches creating pinctrl/mvebu is in the
> >> pinctrl tree, so if patches in the MVEBU tree depend on these,
> >> then it must have pulled in a branch from pinctrl or applied the
> >> same patches in that tree too (which is OK *sometimes*).
> >
> > Yes, Thomas and Gregory informed me of the pinctrl dependency and said
> > they were using for-next from the pinctrl tree. I've used that branch
> > to merge and build successfully. Is that ok in practice or is there a
> > more specific branch I should pull in as a dependency?
>
> Do not use for-next. That is a mix-down for the linux-next tree.
Ok, I wasn't comfortable with that. Thanks for the explaination.
> It is basically created like this:
>
> git checkout for-next
> git reset --hard fixes
> git merge devel
>
> fixes will be based on the latest release candidate and devel on
> something older like -rc1, -rc2.
>
> If you pull something in it must be from the devel branch.
ok.
> The ebst idea is to take the last commit in the devel branch
> that you need, so the last mvebu commit in that branch.
> This is what the ARM SoC guys usually does.
>
> So: git pull <pinctrl tree> devel
> git log ...
> <find the commit you need e.g 10930572>
> git checkout -b my-new-mvebu-stuff 10930572
>
> So you branch off where you have the deps you
> need.
That makes sense. I also need:
gpiolib: fix bug and clarify OF use of ranges
I'll let you know if I run into any trouble.
thx,
Jason.
On Mon, Nov 19, 2012 at 10:39:55AM +0100, Sebastian Hesselbarth wrote:
> Following the ongoing conversion of Orion SoCs to DT, make use of
> gpio and pinctrl drivers through DT. The main dtsi for Dove is prepared
> to allow board specific descriptors to make use of pinctrl muxing.
>
> Signed-off-by: Sebastian Hesselbarth <[email protected]>
> ---
> Cc: Russell King <[email protected]>
> Cc: Linus Walleij <[email protected]>
> Cc: Sebastian Hesselbarth <[email protected]>
> Cc: Jason Cooper <[email protected]>
> Cc: Andrew Lunn <[email protected]>
> Cc: Thomas Petazzoni <[email protected]>
> Cc: Gregory CLEMENT <[email protected]>
> Cc: Axel Lin <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> arch/arm/Kconfig | 2 ++
> arch/arm/boot/dts/dove.dtsi | 20 +++++++++++++++++---
> 2 files changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index d5a28da..bb9a85d 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -539,6 +539,8 @@ config ARCH_DOVE
> select CPU_V7
> select GENERIC_CLOCKEVENTS
> select MIGHT_HAVE_PCI
> + select PINCTRL
> + select PINCTRL_DOVE
> select PLAT_ORION_LEGACY
> select USB_ARCH_HAS_EHCI
> help
> diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
> index 8c8ab62..c457480 100644
> --- a/arch/arm/boot/dts/dove.dtsi
> +++ b/arch/arm/boot/dts/dove.dtsi
> @@ -4,6 +4,12 @@
> compatible = "marvell,dove";
> model = "Marvell Armada 88AP510 SoC";
>
> + aliases {
> + gpio0 = &gpio0;
> + gpio1 = &gpio1;
> + gpio2 = &gpio2;
> + };
> +
> soc@f1000000 {
> compatible = "simple-bus";
> #address-cells = <1>;
> @@ -85,7 +91,8 @@
> #gpio-cells = <2>;
> gpio-controller;
> reg = <0xd0400 0x20>;
> - ngpio = <32>;
> + ngpios = <32>;
> + interrupt-controller;
> interrupts = <12>, <13>, <14>, <60>;
> };
>
> @@ -94,7 +101,8 @@
> #gpio-cells = <2>;
> gpio-controller;
> reg = <0xd0420 0x20>;
> - ngpio = <32>;
> + ngpios = <32>;
> + interrupt-controller;
> interrupts = <61>;
> };
>
> @@ -103,7 +111,13 @@
> #gpio-cells = <2>;
> gpio-controller;
> reg = <0xe8400 0x0c>;
> - ngpio = <8>;
> + ngpios = <8>;
> + };
> +
> + pinctrl: pinctrl@d0200 {
> + compatible = "marvell,dove-pinctrl";
> + reg = <0xd0200 0x10>;
> + clocks = <&gate_clk 22>;
The above line broke the dtbs build target for dove_defconfig. I have
removed it. Please let me know if that is not the correct answer. This
was the only occurence of 'clk' in arch/arm/boot/dts/dove* .
thx,
Jason.
> };
>
> spi0: spi@10600 {
> --
> 1.7.10.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Dear Jason Cooper,
On Fri, 23 Nov 2012 21:39:42 -0500, Jason Cooper wrote:
> > + pinctrl: pinctrl@d0200 {
> > + compatible = "marvell,dove-pinctrl";
> > + reg = <0xd0200 0x10>;
> > + clocks = <&gate_clk 22>;
>
> The above line broke the dtbs build target for dove_defconfig. I have
> removed it. Please let me know if that is not the correct answer. This
> was the only occurence of 'clk' in arch/arm/boot/dts/dove* .
Are you sure you merged
[PATCH 7/8] ARM: dove: switch to DT clock providers ?
This one clearly adds gate_clk in dove.dtsi. This patch was part of the
pull request:
Subject: [GIT PULL v3] core, cpu and gated clocks for mvebu
Date: Tue, 20 Nov 2012 15:31:08 +0100
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
On Sat, Nov 24, 2012 at 08:02:40AM +0100, Thomas Petazzoni wrote:
> Dear Jason Cooper,
>
> On Fri, 23 Nov 2012 21:39:42 -0500, Jason Cooper wrote:
> > > + pinctrl: pinctrl@d0200 {
> > > + compatible = "marvell,dove-pinctrl";
> > > + reg = <0xd0200 0x10>;
> > > + clocks = <&gate_clk 22>;
> >
> > The above line broke the dtbs build target for dove_defconfig. I have
> > removed it. Please let me know if that is not the correct answer. This
> > was the only occurence of 'clk' in arch/arm/boot/dts/dove* .
>
> Are you sure you merged
>
> [PATCH 7/8] ARM: dove: switch to DT clock providers ?
>
> This one clearly adds gate_clk in dove.dtsi. This patch was part of the
> pull request:
>
> Subject: [GIT PULL v3] core, cpu and gated clocks for mvebu
> Date: Tue, 20 Nov 2012 15:31:08 +0100
Yes, so that's what I thought happened. This would have made orion/dt
depend upon mvebu/everything. It already had two other dependencies.
Not ideal.
The good thing is, the build is not broken. Once v3.8-rc1 drops with
all of our stuff merged, I'll post a fixup patch adding this back in.
thx,
Jason.
Dear Jason Cooper,
On Sat, 24 Nov 2012 10:00:04 -0500, Jason Cooper wrote:
> Yes, so that's what I thought happened. This would have made orion/dt
> depend upon mvebu/everything. It already had two other dependencies.
> Not ideal.
>
> The good thing is, the build is not broken. Once v3.8-rc1 drops with
> all of our stuff merged, I'll post a fixup patch adding this back in.
It unfortunately means that Dove will be basically unbootable in
3.8-rc1, as the driver will not be clk_get()ing its gatable clock, and
the clock driver will disable it. Maybe we can just live with it, I
don't know.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
On Sat, Nov 24, 2012 at 07:10:24PM +0100, Thomas Petazzoni wrote:
> Dear Jason Cooper,
>
> On Sat, 24 Nov 2012 10:00:04 -0500, Jason Cooper wrote:
>
> > Yes, so that's what I thought happened. This would have made orion/dt
> > depend upon mvebu/everything. It already had two other dependencies.
> > Not ideal.
> >
> > The good thing is, the build is not broken. Once v3.8-rc1 drops with
> > all of our stuff merged, I'll post a fixup patch adding this back in.
>
> It unfortunately means that Dove will be basically unbootable in
> 3.8-rc1, as the driver will not be clk_get()ing its gatable clock, and
> the clock driver will disable it. Maybe we can just live with it, I
> don't know.
Yes, I thought as much after I sent this reply. Definitely a choice of
the lesser of two evils. As long as we don't break the build or have
horrendous merge conflicts, I think it's tolerable.
Any one who is booting -rc1's is typically bug hunting. This means
Sebastian, who has been CC'd on all of this. I don't want to rely on
this in the future, but doing it once due to the circumstances is
something I'm comfortable answering to.
thx,
Jason.
On 11/24/2012 07:59 PM, Jason Cooper wrote:
> On Sat, Nov 24, 2012 at 07:10:24PM +0100, Thomas Petazzoni wrote:
>> On Sat, 24 Nov 2012 10:00:04 -0500, Jason Cooper wrote:
>>> Yes, so that's what I thought happened. This would have made orion/dt
>>> depend upon mvebu/everything. It already had two other dependencies.
>>> Not ideal.
>>>
>>> The good thing is, the build is not broken. Once v3.8-rc1 drops with
>>> all of our stuff merged, I'll post a fixup patch adding this back in.
>>
>> It unfortunately means that Dove will be basically unbootable in
>> 3.8-rc1, as the driver will not be clk_get()ing its gatable clock, and
>> the clock driver will disable it. Maybe we can just live with it, I
>> don't know.
>
> Yes, I thought as much after I sent this reply. Definitely a choice of
> the lesser of two evils. As long as we don't break the build or have
> horrendous merge conflicts, I think it's tolerable.
>
> Any one who is booting -rc1's is typically bug hunting. This means
> Sebastian, who has been CC'd on all of this. I don't want to rely on
> this in the future, but doing it once due to the circumstances is
> something I'm comfortable answering to.
Jason,
sorry for the late answer. I merged all pull reqs in the order posted
on top of latest linux/master. Thomas is right, removing the clk_gate
from pinctrl potentially could have broken boot on dove. I tried it and
it _does_ boot, because the clk used by pinctrl is optional in pinctrl-dove
and there is no pinhog/device touching the register clocked by the clock.
As soon as I 'cat pinconf-groups' in debugfs, the register is read and
my cubox hangs as expected.
So, finally a fixup patch for 3.8-rc1 is ok for me.
Thanks for merging all the patches!
Sebastian
On Sun, Nov 25, 2012 at 11:51:46AM +0100, Sebastian Hesselbarth wrote:
> On 11/24/2012 07:59 PM, Jason Cooper wrote:
> >On Sat, Nov 24, 2012 at 07:10:24PM +0100, Thomas Petazzoni wrote:
> >>On Sat, 24 Nov 2012 10:00:04 -0500, Jason Cooper wrote:
> >>>Yes, so that's what I thought happened. This would have made orion/dt
> >>>depend upon mvebu/everything. It already had two other dependencies.
> >>>Not ideal.
> >>>
> >>>The good thing is, the build is not broken. Once v3.8-rc1 drops with
> >>>all of our stuff merged, I'll post a fixup patch adding this back in.
> >>
> >>It unfortunately means that Dove will be basically unbootable in
> >>3.8-rc1, as the driver will not be clk_get()ing its gatable clock, and
> >>the clock driver will disable it. Maybe we can just live with it, I
> >>don't know.
> >
> >Yes, I thought as much after I sent this reply. Definitely a choice of
> >the lesser of two evils. As long as we don't break the build or have
> >horrendous merge conflicts, I think it's tolerable.
> >
> >Any one who is booting -rc1's is typically bug hunting. This means
> >Sebastian, who has been CC'd on all of this. I don't want to rely on
> >this in the future, but doing it once due to the circumstances is
> >something I'm comfortable answering to.
>
> sorry for the late answer. I merged all pull reqs in the order posted
> on top of latest linux/master. Thomas is right, removing the clk_gate
> from pinctrl potentially could have broken boot on dove. I tried it and
> it _does_ boot, because the clk used by pinctrl is optional in pinctrl-dove
> and there is no pinhog/device touching the register clocked by the clock.
>
> As soon as I 'cat pinconf-groups' in debugfs, the register is read and
> my cubox hangs as expected.
>
> So, finally a fixup patch for 3.8-rc1 is ok for me.
Great! I'm glad to hear it's not as bad as I feared.
thx,
Jason.
During merge of the mvebu patches a clock gate for pinctrl was
lost. This patch just readds the clock gate.
Signed-off-by: Sebastian Hesselbarth <[email protected]>
---
Cc: Jason Cooper <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Axel Lin <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
arch/arm/boot/dts/dove.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index f3f7e9d..42eac1f 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -117,6 +117,7 @@
pinctrl: pinctrl@d0200 {
compatible = "marvell,dove-pinctrl";
reg = <0xd0200 0x10>;
+ clocks = <&gate_clk 22>;
};
spi0: spi@10600 {
--
1.7.10.4
With the ability to pass clocks through DT, now make the pdma
clock of dove pinctrl mandatory. Otherwise, pinctrl will hang
the system when accessing some registers.
Signed-off-by: Sebastian Hesselbarth <[email protected]>
---
Cc: Jason Cooper <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Axel Lin <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/pinctrl/mvebu/pinctrl-dove.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c
index 40c9c3e..90f257d 100644
--- a/drivers/pinctrl/mvebu/pinctrl-dove.c
+++ b/drivers/pinctrl/mvebu/pinctrl-dove.c
@@ -595,8 +595,11 @@ static int __devinit dove_pinctrl_probe(struct platform_device *pdev)
* grab clk to make sure it is ticking.
*/
clk = devm_clk_get(&pdev->dev, NULL);
- if (!IS_ERR(clk))
- clk_prepare_enable(clk);
+ if (IS_ERR(clk)) {
+ dev_err(&pdev->dev, "Unable to get pdma clock");
+ return -ENODEV;
+ }
+ clk_prepare_enable(clk);
return mvebu_pinctrl_probe(pdev);
}
--
1.7.10.4
Hi Sebastian,
On Mon, Nov 26, 2012 at 10:20:34AM +0100, Sebastian Hesselbarth wrote:
[...]
> diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c
> b/drivers/pinctrl/mvebu/pinctrl-dove.c
> index 40c9c3e..90f257d 100644
> --- a/drivers/pinctrl/mvebu/pinctrl-dove.c
> +++ b/drivers/pinctrl/mvebu/pinctrl-dove.c
> @@ -595,8 +595,11 @@ static int __devinit dove_pinctrl_probe(struct platform_device *pdev)
> * grab clk to make sure it is ticking.
> */
> clk = devm_clk_get(&pdev->dev, NULL);
> - if (!IS_ERR(clk))
> - clk_prepare_enable(clk);
> + if (IS_ERR(clk)) {
> + dev_err(&pdev->dev, "Unable to get pdma clock");
> + return -ENODEV;
Why not propagate the error up using PTR_RET(clk)?
baruch
> + }
> + clk_prepare_enable(clk);
>
> return mvebu_pinctrl_probe(pdev);
> }
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -
During merge of the mvebu patches a clock gate for pinctrl was
lost. This patch just readds the clock gate.
Signed-off-by: Sebastian Hesselbarth <[email protected]>
---
Cc: Jason Cooper <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Axel Lin <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
arch/arm/boot/dts/dove.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index f3f7e9d..42eac1f 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -117,6 +117,7 @@
pinctrl: pinctrl@d0200 {
compatible = "marvell,dove-pinctrl";
reg = <0xd0200 0x10>;
+ clocks = <&gate_clk 22>;
};
spi0: spi@10600 {
--
1.7.10.4
With the ability to pass clocks through DT, now make the pdma
clock of dove pinctrl mandatory. Otherwise, pinctrl will hang
the system when accessing some registers.
Signed-off-by: Sebastian Hesselbarth <[email protected]>
---
v1->v2:
- propagate error of devm_clk_get as suggested by Baruch Siach
Cc: Jason Cooper <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Axel Lin <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/pinctrl/mvebu/pinctrl-dove.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c
index 40c9c3e..9cc219f 100644
--- a/drivers/pinctrl/mvebu/pinctrl-dove.c
+++ b/drivers/pinctrl/mvebu/pinctrl-dove.c
@@ -595,8 +595,11 @@ static int __devinit dove_pinctrl_probe(struct platform_device *pdev)
* grab clk to make sure it is ticking.
*/
clk = devm_clk_get(&pdev->dev, NULL);
- if (!IS_ERR(clk))
- clk_prepare_enable(clk);
+ if (IS_ERR(clk)) {
+ dev_err(&pdev->dev, "Unable to get pdma clock");
+ return PTR_RET(clk);
+ }
+ clk_prepare_enable(clk);
return mvebu_pinctrl_probe(pdev);
}
--
1.7.10.4