[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130130183049.GR7717@titan.lakedaemon.net>
Date: Wed, 30 Jan 2013 13:30:49 -0500
From: Jason Cooper <jason@...edaemon.net>
To: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Russell King <linux@....linux.org.uk>,
Simon Baatz <gmbnomis@...il.com>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 2/2] ARM: kirkwood: fix to retain gbe MAC addresses for
DT kernels
Sebastian,
On Wed, Jan 30, 2013 at 02:26:41AM +0100, Sebastian Hesselbarth wrote:
> The ethernet controller used on kirkwood looses its MAC address
> register contents when the corresponding clock is gated. Until there
> is proper DT support for the mv643xx_eth driver, we add a workaround
> to always enable ge0/ge1 clocks on kirkwood. This workaround is also
> already used on non-DT kirkwood kernels.
Could you please make it clear that this is only relevant for scenarios
where mv643xx_eth is built as a module?
thx,
Jason.
>
> Reported-by: Simon Baatz <gmbnomis@...il.com>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
> ---
> Cc: Simon Baatz <gmbnomis@...il.com>
> Cc: Jason Cooper <jason@...edaemon.net>
> Cc: Andrew Lunn <andrew@...n.ch>
> Cc: Russell King <linux@....linux.org.uk>
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org
> ---
> arch/arm/mach-kirkwood/board-dt.c | 24 +++++++++++++++---------
> 1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
> index de4fd2b..e714ead 100644
> --- a/arch/arm/mach-kirkwood/board-dt.c
> +++ b/arch/arm/mach-kirkwood/board-dt.c
> @@ -41,16 +41,12 @@ static void __init kirkwood_legacy_clk_init(void)
>
> struct device_node *np = of_find_compatible_node(
> NULL, NULL, "marvell,kirkwood-gating-clock");
> -
> struct of_phandle_args clkspec;
> + struct clk *clk;
>
> clkspec.np = np;
> clkspec.args_count = 1;
>
> - clkspec.args[0] = CGC_BIT_GE0;
> - orion_clkdev_add(NULL, "mv643xx_eth_port.0",
> - of_clk_get_from_provider(&clkspec));
> -
> clkspec.args[0] = CGC_BIT_PEX0;
> orion_clkdev_add("0", "pcie",
> of_clk_get_from_provider(&clkspec));
> @@ -63,14 +59,24 @@ static void __init kirkwood_legacy_clk_init(void)
> orion_clkdev_add("1", "pcie",
> of_clk_get_from_provider(&clkspec));
>
> - clkspec.args[0] = CGC_BIT_GE1;
> - 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));
>
> + /*
> + * The ethernet interfaces forget the MAC address assigned by
> + * u-boot if the clocks are turned off. Until proper DT support
> + * is available we always enable them for now.
> + */
> + clkspec.args[0] = CGC_BIT_GE0;
> + clk = of_clk_get_from_provider(&clkspec);
> + orion_clkdev_add(NULL, "mv643xx_eth_port.0", clk);
> + clk_prepare_enable(clk);
> +
> + clkspec.args[0] = CGC_BIT_GE1;
> + clk = of_clk_get_from_provider(&clkspec);
> + orion_clkdev_add(NULL, "mv643xx_eth_port.1", clk);
> + clk_prepare_enable(clk);
> }
>
> static void __init kirkwood_of_clk_init(void)
> --
> 1.7.10.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists