* [PATCH 01/11] ARM: Kirkwood: Fix missing clk for USB device.
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-07 15:11 ` Simon Guinot
2013-01-06 10:10 ` [PATCH 02/11] Power: gpio-poweroff: Fix documentation and gpio_is_valid Andrew Lunn
` (10 subsequent siblings)
11 siblings, 1 reply; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
Without the clock being held by a driver, it gets turned off at a bad
time causing the SoC to lockup. This is often during reboot.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Stefan Peter <s.peter@mpl.ch>
---
arch/arm/boot/dts/kirkwood.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index 7735cee..110d6cb 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -144,6 +144,7 @@
compatible = "marvell,orion-ehci";
reg = <0x50000 0x1000>;
interrupts = <19>;
+ clocks = <&gate_clk 3>;
status = "okay";
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 01/11] ARM: Kirkwood: Fix missing clk for USB device.
2013-01-06 10:10 ` [PATCH 01/11] ARM: Kirkwood: Fix missing clk for USB device Andrew Lunn
@ 2013-01-07 15:11 ` Simon Guinot
2013-01-07 15:27 ` Andrew Lunn
0 siblings, 1 reply; 16+ messages in thread
From: Simon Guinot @ 2013-01-07 15:11 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Jan 06, 2013 at 11:10:34AM +0100, Andrew Lunn wrote:
> Without the clock being held by a driver, it gets turned off at a bad
> time causing the SoC to lockup. This is often during reboot.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> Tested-by: Stefan Peter <s.peter@mpl.ch>
> ---
> arch/arm/boot/dts/kirkwood.dtsi | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
> index 7735cee..110d6cb 100644
> --- a/arch/arm/boot/dts/kirkwood.dtsi
> +++ b/arch/arm/boot/dts/kirkwood.dtsi
> @@ -144,6 +144,7 @@
> compatible = "marvell,orion-ehci";
> reg = <0x50000 0x1000>;
> interrupts = <19>;
> + clocks = <&gate_clk 3>;
> status = "okay";
> };
Hi Andrew,
Maybe you also want to remove the clock alias workaround from
kirkwood_legacy_clk_init() ?
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130107/cb765a85/attachment.sig>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 01/11] ARM: Kirkwood: Fix missing clk for USB device.
2013-01-07 15:11 ` Simon Guinot
@ 2013-01-07 15:27 ` Andrew Lunn
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-07 15:27 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 07, 2013 at 04:11:38PM +0100, Simon Guinot wrote:
> On Sun, Jan 06, 2013 at 11:10:34AM +0100, Andrew Lunn wrote:
> > Without the clock being held by a driver, it gets turned off at a bad
> > time causing the SoC to lockup. This is often during reboot.
> >
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > Tested-by: Stefan Peter <s.peter@mpl.ch>
> > ---
> > arch/arm/boot/dts/kirkwood.dtsi | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
> > index 7735cee..110d6cb 100644
> > --- a/arch/arm/boot/dts/kirkwood.dtsi
> > +++ b/arch/arm/boot/dts/kirkwood.dtsi
> > @@ -144,6 +144,7 @@
> > compatible = "marvell,orion-ehci";
> > reg = <0x50000 0x1000>;
> > interrupts = <19>;
> > + clocks = <&gate_clk 3>;
> > status = "okay";
> > };
>
> Hi Andrew,
>
> Maybe you also want to remove the clock alias workaround from
> kirkwood_legacy_clk_init() ?
Hi Simon
That is not really a fix. It does no harm being there.
We will remove it as a cleanup in 3.9. We can also remove the SDIO
legacy clock as well, since Thomas has patches to convert that driver
to DT.
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 02/11] Power: gpio-poweroff: Fix documentation and gpio_is_valid
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
2013-01-06 10:10 ` [PATCH 01/11] ARM: Kirkwood: Fix missing clk for USB device Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-06 10:10 ` [PATCH 03/11] ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providers Andrew Lunn
` (9 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
Improve the documentation to clarify level vs edge triggered power off.
Improve the comments for level vs edge triggered power off.
Make use of gpio_is_valid().
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
.../devicetree/bindings/gpio/gpio-poweroff.txt | 20 ++++++++++--
drivers/power/reset/gpio-poweroff.c | 33 +++++++++-----------
2 files changed, 32 insertions(+), 21 deletions(-)
diff --git a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt
index 558cdf3..d4eab92 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt
@@ -1,4 +1,19 @@
-GPIO line that should be set high/low to power off a device
+Driver a GPIO line that can be used to turn the power off.
+
+The driver supports both level triggered and edge triggered power off.
+At driver load time, the driver will request the given gpio line and
+install a pm_power_off handler. If the optional properties 'input' is
+not found, the GPIO line will be driven in the inactive
+state. Otherwise its configured as an input.
+
+When the pm_power_off is called, the gpio is configured as an output,
+and drive active, so triggering a level triggered power off
+condition. This will also cause an inactive->active edge condition, so
+triggering positive edge triggered power off. After a delay of 100ms,
+the GPIO is set to inactive, thus causing an active->inactive edge,
+triggering negative edge triggered power off. After another 100ms
+delay the GPIO is driver active again. If the power is still on and
+the CPU still running after a 3000ms delay, a WARN_ON(1) is emitted.
Required properties:
- compatible : should be "gpio-poweroff".
@@ -13,10 +28,9 @@ Optional properties:
property is not specified, the GPIO is initialized as an output in its
inactive state.
-
Examples:
gpio-poweroff {
compatible = "gpio-poweroff";
- gpios = <&gpio 4 0>; /* GPIO 4 Active Low */
+ gpios = <&gpio 4 0>;
};
diff --git a/drivers/power/reset/gpio-poweroff.c b/drivers/power/reset/gpio-poweroff.c
index 0491e53..adc943b 100644
--- a/drivers/power/reset/gpio-poweroff.c
+++ b/drivers/power/reset/gpio-poweroff.c
@@ -29,15 +29,16 @@ static int gpio_active_low;
static void gpio_poweroff_do_poweroff(void)
{
- BUG_ON(gpio_num == -1);
+ BUG_ON(!gpio_is_valid(gpio_num));
- /* drive it active */
+ /* drive it active, also inactive->active edge */
gpio_direction_output(gpio_num, !gpio_active_low);
mdelay(100);
- /* rising edge or drive inactive */
+ /* drive inactive, also active->inactive edge */
gpio_set_value(gpio_num, gpio_active_low);
mdelay(100);
- /* falling edge */
+
+ /* drive it active, also inactive->active edge */
gpio_set_value(gpio_num, !gpio_active_low);
/* give it some time */
@@ -60,15 +61,12 @@ static int __devinit gpio_poweroff_probe(struct platform_device *pdev)
}
gpio_num = of_get_gpio_flags(pdev->dev.of_node, 0, &flags);
- if (gpio_num < 0) {
- pr_err("%s: Could not get GPIO configuration: %d",
- __func__, gpio_num);
- return -ENODEV;
- }
+ if (!gpio_is_valid(gpio_num))
+ return gpio_num;
+
gpio_active_low = flags & OF_GPIO_ACTIVE_LOW;
- if (of_get_property(pdev->dev.of_node, "input", NULL))
- input = true;
+ input = of_property_read_bool(pdev->dev.of_node, "input");
ret = gpio_request(gpio_num, "poweroff-gpio");
if (ret) {
@@ -98,8 +96,7 @@ err:
static int __devexit gpio_poweroff_remove(struct platform_device *pdev)
{
- if (gpio_num != -1)
- gpio_free(gpio_num);
+ gpio_free(gpio_num);
if (pm_power_off == &gpio_poweroff_do_poweroff)
pm_power_off = NULL;
@@ -115,15 +112,15 @@ static struct platform_driver gpio_poweroff_driver = {
.probe = gpio_poweroff_probe,
.remove = __devexit_p(gpio_poweroff_remove),
.driver = {
- .name = "poweroff-gpio",
- .owner = THIS_MODULE,
- .of_match_table = of_gpio_poweroff_match,
- },
+ .name = "poweroff-gpio",
+ .owner = THIS_MODULE,
+ .of_match_table = of_gpio_poweroff_match,
+ },
};
module_platform_driver(gpio_poweroff_driver);
MODULE_AUTHOR("Jamie Lentin <jm@lentin.co.uk>");
MODULE_DESCRIPTION("GPIO poweroff driver");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:poweroff-gpio");
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 03/11] ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providers
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
2013-01-06 10:10 ` [PATCH 01/11] ARM: Kirkwood: Fix missing clk for USB device Andrew Lunn
2013-01-06 10:10 ` [PATCH 02/11] Power: gpio-poweroff: Fix documentation and gpio_is_valid Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-06 10:10 ` [PATCH 04/11] ARM: Kirkwood: Fix missing sdio clock Andrew Lunn
` (8 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Clock Management of kirkwood has moved to DT clock providers.
However, TWSI1 has not yet been done.
This switches TWSI1 of 88f6282 to DT clock providers.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/boot/dts/kirkwood-6282.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi
index 9ae2004..4ccea21 100644
--- a/arch/arm/boot/dts/kirkwood-6282.dtsi
+++ b/arch/arm/boot/dts/kirkwood-6282.dtsi
@@ -39,6 +39,7 @@
#size-cells = <0>;
interrupts = <32>;
clock-frequency = <100000>;
+ clocks = <&gate_clk 7>;
status = "disabled";
};
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 04/11] ARM: Kirkwood: Fix missing sdio clock
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
` (2 preceding siblings ...)
2013-01-06 10:10 ` [PATCH 03/11] ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providers Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-06 10:10 ` [PATCH 05/11] ARM: Kirkwood: Use fixed-regulator instead of board gpio call Andrew Lunn
` (7 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
We moved to declaring clk gates in DT. However, device which do not
yet have a DT binding need to have a clkdev alias. This was missing
for SDIO.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Stefan Peter <s.peter@mplch>
---
arch/arm/mach-kirkwood/board-dt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index ff4150a..de4fd2b 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -67,6 +67,10 @@ static void __init kirkwood_legacy_clk_init(void)
orion_clkdev_add(NULL, "mv643xx_eth_port.1",
of_clk_get_from_provider(&clkspec));
+ clkspec.args[0] = CGC_BIT_SDIO;
+ orion_clkdev_add(NULL, "mvsdio",
+ of_clk_get_from_provider(&clkspec));
+
}
static void __init kirkwood_of_clk_init(void)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 05/11] ARM: Kirkwood: Use fixed-regulator instead of board gpio call
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
` (3 preceding siblings ...)
2013-01-06 10:10 ` [PATCH 04/11] ARM: Kirkwood: Fix missing sdio clock Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-06 10:10 ` [PATCH 06/11] clk: mvebu: Remove inappropriate __init tagging Andrew Lunn
` (6 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
With the change to a DT based pinctrl/gpio driver, using gpio API
calls in board-*.c files no longer works, a dereferenced NULL pointer
exception occurs instead. By converting the GPIO code into a
fixed-regulator which gets probed later once pinctrl/gpio is
available, we avoid the exception.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Stefan Peter <s.peter@mplch>
---
arch/arm/boot/dts/kirkwood-topkick.dts | 17 +++++++++++++++++
arch/arm/mach-kirkwood/board-usi_topkick.c | 4 ----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
index c0de5a7..cd15452 100644
--- a/arch/arm/boot/dts/kirkwood-topkick.dts
+++ b/arch/arm/boot/dts/kirkwood-topkick.dts
@@ -82,4 +82,21 @@
gpios = <&gpio1 16 1>;
};
};
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sata0_power: regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "SATA0 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 4 0>;
+ };
+ };
};
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c
index 15e69fc..23d2dd1 100644
--- a/arch/arm/mach-kirkwood/board-usi_topkick.c
+++ b/arch/arm/mach-kirkwood/board-usi_topkick.c
@@ -64,8 +64,6 @@ static unsigned int topkick_mpp_config[] __initdata = {
0
};
-#define TOPKICK_SATA0_PWR_ENABLE 36
-
void __init usi_topkick_init(void)
{
/*
@@ -73,8 +71,6 @@ void __init usi_topkick_init(void)
*/
kirkwood_mpp_conf(topkick_mpp_config);
- /* SATA0 power enable */
- gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1);
kirkwood_ge00_init(&topkick_ge00_data);
kirkwood_sdio_init(&topkick_mvsdio_data);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 06/11] clk: mvebu: Remove inappropriate __init tagging
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
` (4 preceding siblings ...)
2013-01-06 10:10 ` [PATCH 05/11] ARM: Kirkwood: Use fixed-regulator instead of board gpio call Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-06 10:10 ` [PATCH 07/11] arm: mvebu: Armada XP MV78230 has two cores, not one Andrew Lunn
` (5 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
From: Joshua Coombs <josh.coombs@gmail.com>
If the Orion WDT driver is built as a module, an opps occurs during
clk lookup when calling mvebu_clk_gating_get_src(). Remove the
inappropriate __init tag so the function is available for modules
after kernel init.
Signed-off-by: Joshua Coombs <josh.coombs@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/clk/mvebu/clk-gating-ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/mvebu/clk-gating-ctrl.c b/drivers/clk/mvebu/clk-gating-ctrl.c
index c6d3c26..8fa5408 100644
--- a/drivers/clk/mvebu/clk-gating-ctrl.c
+++ b/drivers/clk/mvebu/clk-gating-ctrl.c
@@ -32,7 +32,7 @@ struct mvebu_soc_descr {
#define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw)
-static struct clk __init *mvebu_clk_gating_get_src(
+static struct clk *mvebu_clk_gating_get_src(
struct of_phandle_args *clkspec, void *data)
{
struct mvebu_gating_ctrl *ctrl = (struct mvebu_gating_ctrl *)data;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 07/11] arm: mvebu: Armada XP MV78230 has two cores, not one
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
` (5 preceding siblings ...)
2013-01-06 10:10 ` [PATCH 06/11] clk: mvebu: Remove inappropriate __init tagging Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-06 10:10 ` [PATCH 08/11] arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces Andrew Lunn
` (4 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Contrary to our understanding at the time armada-xp-mv78230.dtsi was
written, the MV78230 variant of the Armada XP SoC has two cores and
not one. This patch updates the .dtsi file to take into account this
reality.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/boot/dts/armada-xp-mv78230.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
index c45c7b4..8f90fac 100644
--- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
@@ -34,6 +34,13 @@
reg = <0>;
clocks = <&cpuclk 0>;
};
+
+ cpu at 1 {
+ device_type = "cpu";
+ compatible = "marvell,sheeva-v7";
+ reg = <1>;
+ clocks = <&cpuclk 1>;
+ };
}
soc {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 08/11] arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
` (6 preceding siblings ...)
2013-01-06 10:10 ` [PATCH 07/11] arm: mvebu: Armada XP MV78230 has two cores, not one Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-06 10:10 ` [PATCH 09/11] arm: mvebu: Add missing ; for cpu node Andrew Lunn
` (3 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
We originally thought that the MV78230 variant of the Armada XP had
four Ethernet interfaces, like the other variants MV78260 and
MV78460. In fact, this is not true, and the MV78230 has only three
Ethernet interfaces.
So, the definitions of the Ethernet interfaces is now done as follows:
* armada-370-xp.dtsi: definitions of the first two interfaces, that
are common to Armada 370 and Armada XP
* armada-xp.dtsi: definition of the third interface, common to all
Armada XP variants.
* armada-xp-mv78260.dtsi and armada-xp-mv78460.dtsi: definition of
the fourth interface.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/boot/dts/armada-xp-mv78260.dtsi | 8 ++++++++
arch/arm/boot/dts/armada-xp-mv78460.dtsi | 8 ++++++++
arch/arm/boot/dts/armada-xp.dtsi | 8 --------
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
index a2aee57..1c1937d 100644
--- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
@@ -85,5 +85,13 @@
#interrupts-cells = <2>;
interrupts = <24>;
};
+
+ ethernet at d0034000 {
+ compatible = "marvell,armada-370-neta";
+ reg = <0xd0034000 0x2500>;
+ interrupts = <14>;
+ clocks = <&gateclk 1>;
+ status = "disabled";
+ };
};
};
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
index da03a12..4905cf3 100644
--- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
@@ -100,5 +100,13 @@
#interrupts-cells = <2>;
interrupts = <24>;
};
+
+ ethernet at d0034000 {
+ compatible = "marvell,armada-370-neta";
+ reg = <0xd0034000 0x2500>;
+ interrupts = <14>;
+ clocks = <&gateclk 1>;
+ status = "disabled";
+ };
};
};
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index 367aa3f..2a98e12 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -93,14 +93,6 @@
status = "disabled";
};
- ethernet at d0034000 {
- compatible = "marvell,armada-370-neta";
- reg = <0xd0034000 0x2500>;
- interrupts = <14>;
- clocks = <&gateclk 1>;
- status = "disabled";
- };
-
xor at d0060900 {
compatible = "marvell,orion-xor";
reg = <0xd0060900 0x100
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 09/11] arm: mvebu: Add missing ; for cpu node.
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
` (7 preceding siblings ...)
2013-01-06 10:10 ` [PATCH 08/11] arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-06 10:10 ` [PATCH 10/11] dma: mv_xor: fix error handling of mv_xor_channel_add() Andrew Lunn
` (2 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
The Armada XP MV78230 DT include file is missing a ; at the
end of the cpu node.
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/boot/dts/armada-xp-mv78230.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
index 8f90fac..271855a 100644
--- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
@@ -41,7 +41,7 @@
reg = <1>;
clocks = <&cpuclk 1>;
};
- }
+ };
soc {
pinctrl {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 10/11] dma: mv_xor: fix error handling of mv_xor_channel_add()
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
` (8 preceding siblings ...)
2013-01-06 10:10 ` [PATCH 09/11] arm: mvebu: Add missing ; for cpu node Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-06 10:10 ` [PATCH 11/11] dma: mv_xor: fix error handling for clocks Andrew Lunn
2013-01-07 13:47 ` [PATCH 00/11] Fixes for 3.8-rc Arnd Bergmann
11 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
When mv_xor_channel_add() fails for one XOR channel, we jump to the
err_channel_add label to clean up all previous channels that had been
initialized correctly. Unfortunately, while handling this error
condition, we were disposing the IRQ mapping before calling
mv_xor_channel_remove() (which does the free_irq()), which is
incorrect.
Instead, do things properly in the reverse order of the
initialization: first remove the XOR channel (so that free_irq() is
done), and then dispose the IRQ mapping.
This avoids ugly warnings when for some reason one of the XOR channel
fails to initialize.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
drivers/dma/mv_xor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index ac71f55..cc5d23d 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1361,9 +1361,9 @@ static int mv_xor_probe(struct platform_device *pdev)
err_channel_add:
for (i = 0; i < MV_XOR_MAX_CHANNELS; i++)
if (xordev->channels[i]) {
+ mv_xor_channel_remove(xordev->channels[i]);
if (pdev->dev.of_node)
irq_dispose_mapping(xordev->channels[i]->irq);
- mv_xor_channel_remove(xordev->channels[i]);
}
clk_disable_unprepare(xordev->clk);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 11/11] dma: mv_xor: fix error handling for clocks
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
` (9 preceding siblings ...)
2013-01-06 10:10 ` [PATCH 10/11] dma: mv_xor: fix error handling of mv_xor_channel_add() Andrew Lunn
@ 2013-01-06 10:10 ` Andrew Lunn
2013-01-07 13:47 ` [PATCH 00/11] Fixes for 3.8-rc Arnd Bergmann
11 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-06 10:10 UTC (permalink / raw)
To: linux-arm-kernel
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
When a channel fails to initialize, we release all ressources,
including clocks. However, a XOR unit is not necessarily associated to
a clock (some variants of Marvell SoCs have a clock for XOR units,
some don't), so we shouldn't unconditionally be releasing the clock.
Instead, just like we do in the mv_xor_remove() function, we should
check if one clock was found before releasing it.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
drivers/dma/mv_xor.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index cc5d23d..e17fad0 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1366,8 +1366,11 @@ err_channel_add:
irq_dispose_mapping(xordev->channels[i]->irq);
}
- clk_disable_unprepare(xordev->clk);
- clk_put(xordev->clk);
+ if (!IS_ERR(xordev->clk)) {
+ clk_disable_unprepare(xordev->clk);
+ clk_put(xordev->clk);
+ }
+
return ret;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 00/11] Fixes for 3.8-rc
2013-01-06 10:10 [PATCH 00/11] Fixes for 3.8-rc Andrew Lunn
` (10 preceding siblings ...)
2013-01-06 10:10 ` [PATCH 11/11] dma: mv_xor: fix error handling for clocks Andrew Lunn
@ 2013-01-07 13:47 ` Arnd Bergmann
2013-01-07 13:55 ` Andrew Lunn
11 siblings, 1 reply; 16+ messages in thread
From: Arnd Bergmann @ 2013-01-07 13:47 UTC (permalink / raw)
To: linux-arm-kernel
On Sunday 06 January 2013, Andrew Lunn wrote:
> This patchset is a collection of fixes for 3.8-rc for Marvell SoCs and
> drivers.
>
> If nobody objects, i will send Olof and Arnd a pull request sometime
> Monday.
The patches all look good to me.
Arnd
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH 00/11] Fixes for 3.8-rc
2013-01-07 13:47 ` [PATCH 00/11] Fixes for 3.8-rc Arnd Bergmann
@ 2013-01-07 13:55 ` Andrew Lunn
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2013-01-07 13:55 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 07, 2013 at 01:47:45PM +0000, Arnd Bergmann wrote:
> On Sunday 06 January 2013, Andrew Lunn wrote:
> > This patchset is a collection of fixes for 3.8-rc for Marvell SoCs and
> > drivers.
> >
> > If nobody objects, i will send Olof and Arnd a pull request sometime
> > Monday.
>
> The patches all look good to me.
Hi Arnd
Thanks for the review. Jason sent a pull request yesterday for these
patches, plus one more for the UART on 370/XP.
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread