All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] clk: mvebu: add gate ctrl for Prestera kirkwood variants
Date: Tue, 07 May 2013 18:11:44 +0200	[thread overview]
Message-ID: <518927C0.6070600@free-electrons.com> (raw)
In-Reply-To: <1367941941-19152-2-git-send-email-valentin.longchamp@keymile.com>

On 05/07/2013 05:52 PM, Valentin Longchamp wrote:
> The kirkwood device found in the Prestera SoCs does not have all the
> peripherals of its the usual kirkwood SoCs. There are hence missing
> clocks in the SoCs.
> 
> This patch registers another gate controller for the kirkwood that
> registers only the available clocks of this kirkwood variant.

Hi Valentin,

Overall the patch set looks OK, however I don't understand why you need
to declare a new gate controller. The list you delcared seemed to be
just a subset of the Kirkwood one, why can't you use this one?

Note that I am not an expert for the kirkwood hardware, so maybe I
missed something.

Regards,

> 
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> ---
>  .../devicetree/bindings/clock/mvebu-gated-clock.txt   | 17 +++++++++++++++++
>  drivers/clk/mvebu/clk-gating-ctrl.c                   | 19 +++++++++++++++++++
>  2 files changed, 36 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
> index cffc93d..7f494e90 100644
> --- a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
> +++ b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
> @@ -92,10 +92,27 @@ ID	Clock	Peripheral
>  19	ge1	Gigabit Ethernet 1
>  20	tdm	Time Division Mplx
>  
> +The following is a list of provided IDs for Kirkwood Prestera variant:
> +ID	Clock	Peripheral
> +-----------------------------------
> +0	ge0	Gigabit Ethernet 0
> +2	pex0	PCIe Cntrl 0
> +3	usb0	USB Host 0
> +4	sdio	SDIO Cntrl
> +5	tsu	Transp. Stream Unit
> +6	dunit	SDRAM Cntrl
> +7	runit	Runit
> +8	xor0	XOR DMA 0
> +16	xor1	XOR DMA 1
> +17	crypto	CESA engine
> +19	ge1	Gigabit Ethernet 1
> +
> +
>  Required properties:
>  - compatible : shall be one of the following:
>  	"marvell,dove-gating-clock" - for Dove SoC clock gating
>  	"marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating
> +	"marvell,prestera-kw-gating-clock" - for Preseta SoC clock gating
>  - reg : shall be the register address of the Clock Gating Control register
>  - #clock-cells : from common clock binding; shall be set to 1
>  
> diff --git a/drivers/clk/mvebu/clk-gating-ctrl.c b/drivers/clk/mvebu/clk-gating-ctrl.c
> index ebf141d..ba37802 100644
> --- a/drivers/clk/mvebu/clk-gating-ctrl.c
> +++ b/drivers/clk/mvebu/clk-gating-ctrl.c
> @@ -203,6 +203,21 @@ static const struct mvebu_soc_descr __initconst kirkwood_gating_descr[] = {
>  	{ "tdm", NULL, 20 },
>  	{ }
>  };
> +
> +static const struct mvebu_soc_descr __initconst prestera_kw_gating_descr[] = {
> +	{ "ge0", NULL, 0 },
> +	{ "pex0", NULL, 2 },
> +	{ "usb0", NULL, 3 },
> +	{ "sdio", NULL, 4 },
> +	{ "tsu", NULL, 5 },
> +	{ "runit", NULL, 7 },
> +	{ "xor0", NULL, 8 },
> +	{ "powersave", "cpuclk", 11 },
> +	{ "xor1", NULL, 16 },
> +	{ "crypto", NULL, 17 },
> +	{ "ge1", NULL, 19 },
> +	{ }
> +};
>  #endif
>  
>  static const __initdata struct of_device_id clk_gating_match[] = {
> @@ -232,6 +247,10 @@ static const __initdata struct of_device_id clk_gating_match[] = {
>  		.compatible = "marvell,kirkwood-gating-clock",
>  		.data = kirkwood_gating_descr,
>  	},
> +	{
> +		.compatible = "marvell,prestera-kw-gating-clock",
> +		.data = prestera_kw_gating_descr,
> +	},
>  #endif
>  
>  	{ }
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Valentin Longchamp
	<valentin.longchamp-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
Cc: andrew-g2DYL2Zd6BY@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH 1/3] clk: mvebu: add gate ctrl for Prestera kirkwood variants
Date: Tue, 07 May 2013 18:11:44 +0200	[thread overview]
Message-ID: <518927C0.6070600@free-electrons.com> (raw)
In-Reply-To: <1367941941-19152-2-git-send-email-valentin.longchamp-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>

On 05/07/2013 05:52 PM, Valentin Longchamp wrote:
> The kirkwood device found in the Prestera SoCs does not have all the
> peripherals of its the usual kirkwood SoCs. There are hence missing
> clocks in the SoCs.
> 
> This patch registers another gate controller for the kirkwood that
> registers only the available clocks of this kirkwood variant.

Hi Valentin,

Overall the patch set looks OK, however I don't understand why you need
to declare a new gate controller. The list you delcared seemed to be
just a subset of the Kirkwood one, why can't you use this one?

Note that I am not an expert for the kirkwood hardware, so maybe I
missed something.

Regards,

> 
> Signed-off-by: Valentin Longchamp <valentin.longchamp-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
> ---
>  .../devicetree/bindings/clock/mvebu-gated-clock.txt   | 17 +++++++++++++++++
>  drivers/clk/mvebu/clk-gating-ctrl.c                   | 19 +++++++++++++++++++
>  2 files changed, 36 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
> index cffc93d..7f494e90 100644
> --- a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
> +++ b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
> @@ -92,10 +92,27 @@ ID	Clock	Peripheral
>  19	ge1	Gigabit Ethernet 1
>  20	tdm	Time Division Mplx
>  
> +The following is a list of provided IDs for Kirkwood Prestera variant:
> +ID	Clock	Peripheral
> +-----------------------------------
> +0	ge0	Gigabit Ethernet 0
> +2	pex0	PCIe Cntrl 0
> +3	usb0	USB Host 0
> +4	sdio	SDIO Cntrl
> +5	tsu	Transp. Stream Unit
> +6	dunit	SDRAM Cntrl
> +7	runit	Runit
> +8	xor0	XOR DMA 0
> +16	xor1	XOR DMA 1
> +17	crypto	CESA engine
> +19	ge1	Gigabit Ethernet 1
> +
> +
>  Required properties:
>  - compatible : shall be one of the following:
>  	"marvell,dove-gating-clock" - for Dove SoC clock gating
>  	"marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating
> +	"marvell,prestera-kw-gating-clock" - for Preseta SoC clock gating
>  - reg : shall be the register address of the Clock Gating Control register
>  - #clock-cells : from common clock binding; shall be set to 1
>  
> diff --git a/drivers/clk/mvebu/clk-gating-ctrl.c b/drivers/clk/mvebu/clk-gating-ctrl.c
> index ebf141d..ba37802 100644
> --- a/drivers/clk/mvebu/clk-gating-ctrl.c
> +++ b/drivers/clk/mvebu/clk-gating-ctrl.c
> @@ -203,6 +203,21 @@ static const struct mvebu_soc_descr __initconst kirkwood_gating_descr[] = {
>  	{ "tdm", NULL, 20 },
>  	{ }
>  };
> +
> +static const struct mvebu_soc_descr __initconst prestera_kw_gating_descr[] = {
> +	{ "ge0", NULL, 0 },
> +	{ "pex0", NULL, 2 },
> +	{ "usb0", NULL, 3 },
> +	{ "sdio", NULL, 4 },
> +	{ "tsu", NULL, 5 },
> +	{ "runit", NULL, 7 },
> +	{ "xor0", NULL, 8 },
> +	{ "powersave", "cpuclk", 11 },
> +	{ "xor1", NULL, 16 },
> +	{ "crypto", NULL, 17 },
> +	{ "ge1", NULL, 19 },
> +	{ }
> +};
>  #endif
>  
>  static const __initdata struct of_device_id clk_gating_match[] = {
> @@ -232,6 +247,10 @@ static const __initdata struct of_device_id clk_gating_match[] = {
>  		.compatible = "marvell,kirkwood-gating-clock",
>  		.data = kirkwood_gating_descr,
>  	},
> +	{
> +		.compatible = "marvell,prestera-kw-gating-clock",
> +		.data = prestera_kw_gating_descr,
> +	},
>  #endif
>  
>  	{ }
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2013-05-07 16:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 15:52 [RFC PATCH] Alternative clk gate ctrl for Kirkwood variants Valentin Longchamp
2013-05-07 15:52 ` Valentin Longchamp
2013-05-07 15:52 ` [PATCH 1/3] clk: mvebu: add gate ctrl for Prestera kirkwood variants Valentin Longchamp
2013-05-07 15:52   ` Valentin Longchamp
2013-05-07 16:11   ` Gregory CLEMENT [this message]
2013-05-07 16:11     ` Gregory CLEMENT
2013-05-07 16:32     ` Andrew Lunn
2013-05-07 16:32       ` Andrew Lunn
2013-05-07 16:36     ` Sebastian Hesselbarth
2013-05-07 16:36       ` Sebastian Hesselbarth
2013-05-08  7:04       ` Valentin Longchamp
2013-05-08  7:04         ` Valentin Longchamp
2013-05-08  7:21         ` Sebastian Hesselbarth
2013-05-08  7:21           ` Sebastian Hesselbarth
2013-05-08 13:25           ` Jason Cooper
2013-05-08 13:25             ` Jason Cooper
2013-05-07 15:52 ` [PATCH 2/3] ARM: kirkwood: look for alternative gate ctrl of node Valentin Longchamp
2013-05-07 15:52   ` Valentin Longchamp
2013-05-07 15:52 ` [PATCH 3/3] ARM: kirkwood: remove clock gating disabling for km_kirkwood Valentin Longchamp
2013-05-07 15:52   ` Valentin Longchamp
2013-05-07 16:05   ` Jason Cooper
2013-05-07 16:05     ` Jason Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=518927C0.6070600@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.