All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-13 11:20 ` Heiko Stübner
  0 siblings, 0 replies; 17+ messages in thread
From: Heiko Stübner @ 2015-09-13 11:20 UTC (permalink / raw)
  To: linux-arm-kernel

Again a result of the gpio-clock-liberation the rk3368 needs the
pclk_pd_pmu marked as critical, to boot successfully.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
should go on top of clk-fixes. Sorry only finding these piece
by piece :-) .

 drivers/clk/rockchip/clk-rk3368.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/clk/rockchip/clk-rk3368.c b/drivers/clk/rockchip/clk-rk3368.c
index 9c5d61e..7e6b783 100644
--- a/drivers/clk/rockchip/clk-rk3368.c
+++ b/drivers/clk/rockchip/clk-rk3368.c
@@ -818,6 +818,10 @@ static struct rockchip_clk_branch rk3368_clk_branches[] __initdata = {
 	GATE(0, "sclk_timer00", "xin24m", CLK_IGNORE_UNUSED, RK3368_CLKGATE_CON(24), 0, GFLAGS),
 };
 
+static const char *const rk3368_critical_clocks[] __initconst = {
+	"pclk_pd_pmu",
+};
+
 static void __init rk3368_clk_init(struct device_node *np)
 {
 	void __iomem *reg_base;
@@ -862,6 +866,8 @@ static void __init rk3368_clk_init(struct device_node *np)
 				   RK3368_GRF_SOC_STATUS0);
 	rockchip_clk_register_branches(rk3368_clk_branches,
 				  ARRAY_SIZE(rk3368_clk_branches));
+	rockchip_clk_protect_critical(rk3368_critical_clocks,
+				      ARRAY_SIZE(rk3368_critical_clocks));
 
 	rockchip_clk_register_armclk(ARMCLKB, "armclkb",
 			mux_armclkb_p, ARRAY_SIZE(mux_armclkb_p),
-- 
2.5.1

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

* [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-13 11:20 ` Heiko Stübner
  0 siblings, 0 replies; 17+ messages in thread
From: Heiko Stübner @ 2015-09-13 11:20 UTC (permalink / raw)
  To: mturquette, sboyd
  Cc: Mark Rutland, linux-rockchip, linux-clk, linux-arm-kernel

Again a result of the gpio-clock-liberation the rk3368 needs the
pclk_pd_pmu marked as critical, to boot successfully.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
should go on top of clk-fixes. Sorry only finding these piece
by piece :-) .

 drivers/clk/rockchip/clk-rk3368.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/clk/rockchip/clk-rk3368.c b/drivers/clk/rockchip/clk-rk3368.c
index 9c5d61e..7e6b783 100644
--- a/drivers/clk/rockchip/clk-rk3368.c
+++ b/drivers/clk/rockchip/clk-rk3368.c
@@ -818,6 +818,10 @@ static struct rockchip_clk_branch rk3368_clk_branches[] __initdata = {
 	GATE(0, "sclk_timer00", "xin24m", CLK_IGNORE_UNUSED, RK3368_CLKGATE_CON(24), 0, GFLAGS),
 };
 
+static const char *const rk3368_critical_clocks[] __initconst = {
+	"pclk_pd_pmu",
+};
+
 static void __init rk3368_clk_init(struct device_node *np)
 {
 	void __iomem *reg_base;
@@ -862,6 +866,8 @@ static void __init rk3368_clk_init(struct device_node *np)
 				   RK3368_GRF_SOC_STATUS0);
 	rockchip_clk_register_branches(rk3368_clk_branches,
 				  ARRAY_SIZE(rk3368_clk_branches));
+	rockchip_clk_protect_critical(rk3368_critical_clocks,
+				      ARRAY_SIZE(rk3368_critical_clocks));
 
 	rockchip_clk_register_armclk(ARMCLKB, "armclkb",
 			mux_armclkb_p, ARRAY_SIZE(mux_armclkb_p),
-- 
2.5.1



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-13 11:20 ` Heiko Stübner
  0 siblings, 0 replies; 17+ messages in thread
From: Heiko Stübner @ 2015-09-13 11:20 UTC (permalink / raw)
  To: mturquette, sboyd
  Cc: linux-clk, linux-rockchip, linux-arm-kernel, Mark Rutland

Again a result of the gpio-clock-liberation the rk3368 needs the
pclk_pd_pmu marked as critical, to boot successfully.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
should go on top of clk-fixes. Sorry only finding these piece
by piece :-) .

 drivers/clk/rockchip/clk-rk3368.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/clk/rockchip/clk-rk3368.c b/drivers/clk/rockchip/clk-rk3368.c
index 9c5d61e..7e6b783 100644
--- a/drivers/clk/rockchip/clk-rk3368.c
+++ b/drivers/clk/rockchip/clk-rk3368.c
@@ -818,6 +818,10 @@ static struct rockchip_clk_branch rk3368_clk_branches[] __initdata = {
 	GATE(0, "sclk_timer00", "xin24m", CLK_IGNORE_UNUSED, RK3368_CLKGATE_CON(24), 0, GFLAGS),
 };
 
+static const char *const rk3368_critical_clocks[] __initconst = {
+	"pclk_pd_pmu",
+};
+
 static void __init rk3368_clk_init(struct device_node *np)
 {
 	void __iomem *reg_base;
@@ -862,6 +866,8 @@ static void __init rk3368_clk_init(struct device_node *np)
 				   RK3368_GRF_SOC_STATUS0);
 	rockchip_clk_register_branches(rk3368_clk_branches,
 				  ARRAY_SIZE(rk3368_clk_branches));
+	rockchip_clk_protect_critical(rk3368_critical_clocks,
+				      ARRAY_SIZE(rk3368_critical_clocks));
 
 	rockchip_clk_register_armclk(ARMCLKB, "armclkb",
 			mux_armclkb_p, ARRAY_SIZE(mux_armclkb_p),
-- 
2.5.1



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

* [PATCH] clk: rockchip: add critical clock for rk3368
  2015-09-13 11:20 ` Heiko Stübner
  (?)
@ 2015-09-14 14:19   ` Mark Rutland
  -1 siblings, 0 replies; 17+ messages in thread
From: Mark Rutland @ 2015-09-14 14:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Sep 13, 2015 at 12:20:36PM +0100, Heiko St?bner wrote:
> Again a result of the gpio-clock-liberation the rk3368 needs the
> pclk_pd_pmu marked as critical, to boot successfully.
> 
> Reported-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

FWIW: Tested-by: Mark Rutland <mark.rutland@arm.com>

I'm surprised that we don't describe these as critical in the DT, given
that this isn't really an internal property of the clock controller, but
rather what happens to be attached to it. That ship appears to have
sailed, however.

Thanks,
Mark.

> ---
> should go on top of clk-fixes. Sorry only finding these piece
> by piece :-) .
> 
>  drivers/clk/rockchip/clk-rk3368.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/clk/rockchip/clk-rk3368.c b/drivers/clk/rockchip/clk-rk3368.c
> index 9c5d61e..7e6b783 100644
> --- a/drivers/clk/rockchip/clk-rk3368.c
> +++ b/drivers/clk/rockchip/clk-rk3368.c
> @@ -818,6 +818,10 @@ static struct rockchip_clk_branch rk3368_clk_branches[] __initdata = {
>  	GATE(0, "sclk_timer00", "xin24m", CLK_IGNORE_UNUSED, RK3368_CLKGATE_CON(24), 0, GFLAGS),
>  };
>  
> +static const char *const rk3368_critical_clocks[] __initconst = {
> +	"pclk_pd_pmu",
> +};
> +
>  static void __init rk3368_clk_init(struct device_node *np)
>  {
>  	void __iomem *reg_base;
> @@ -862,6 +866,8 @@ static void __init rk3368_clk_init(struct device_node *np)
>  				   RK3368_GRF_SOC_STATUS0);
>  	rockchip_clk_register_branches(rk3368_clk_branches,
>  				  ARRAY_SIZE(rk3368_clk_branches));
> +	rockchip_clk_protect_critical(rk3368_critical_clocks,
> +				      ARRAY_SIZE(rk3368_critical_clocks));
>  
>  	rockchip_clk_register_armclk(ARMCLKB, "armclkb",
>  			mux_armclkb_p, ARRAY_SIZE(mux_armclkb_p),
> -- 
> 2.5.1
> 
> 

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

* Re: [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-14 14:19   ` Mark Rutland
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Rutland @ 2015-09-14 14:19 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: linux-rockchip@lists.infradead.org, mturquette@baylibre.com,
	sboyd@codeaurora.org, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org

T24gU3VuLCBTZXAgMTMsIDIwMTUgYXQgMTI6MjA6MzZQTSArMDEwMCwgSGVpa28gU3TDvGJuZXIg
d3JvdGU6Cj4gQWdhaW4gYSByZXN1bHQgb2YgdGhlIGdwaW8tY2xvY2stbGliZXJhdGlvbiB0aGUg
cmszMzY4IG5lZWRzIHRoZQo+IHBjbGtfcGRfcG11IG1hcmtlZCBhcyBjcml0aWNhbCwgdG8gYm9v
dCBzdWNjZXNzZnVsbHkuCj4gCj4gUmVwb3J0ZWQtYnk6IE1hcmsgUnV0bGFuZCA8bWFyay5ydXRs
YW5kQGFybS5jb20+Cj4gU2lnbmVkLW9mZi1ieTogSGVpa28gU3R1ZWJuZXIgPGhlaWtvQHNudGVj
aC5kZT4KCkZXSVc6IFRlc3RlZC1ieTogTWFyayBSdXRsYW5kIDxtYXJrLnJ1dGxhbmRAYXJtLmNv
bT4KCkknbSBzdXJwcmlzZWQgdGhhdCB3ZSBkb24ndCBkZXNjcmliZSB0aGVzZSBhcyBjcml0aWNh
bCBpbiB0aGUgRFQsIGdpdmVuCnRoYXQgdGhpcyBpc24ndCByZWFsbHkgYW4gaW50ZXJuYWwgcHJv
cGVydHkgb2YgdGhlIGNsb2NrIGNvbnRyb2xsZXIsIGJ1dApyYXRoZXIgd2hhdCBoYXBwZW5zIHRv
IGJlIGF0dGFjaGVkIHRvIGl0LiBUaGF0IHNoaXAgYXBwZWFycyB0byBoYXZlCnNhaWxlZCwgaG93
ZXZlci4KClRoYW5rcywKTWFyay4KCj4gLS0tCj4gc2hvdWxkIGdvIG9uIHRvcCBvZiBjbGstZml4
ZXMuIFNvcnJ5IG9ubHkgZmluZGluZyB0aGVzZSBwaWVjZQo+IGJ5IHBpZWNlIDotKSAuCj4gCj4g
IGRyaXZlcnMvY2xrL3JvY2tjaGlwL2Nsay1yazMzNjguYyB8IDYgKysrKysrCj4gIDEgZmlsZSBj
aGFuZ2VkLCA2IGluc2VydGlvbnMoKykKPiAKPiBkaWZmIC0tZ2l0IGEvZHJpdmVycy9jbGsvcm9j
a2NoaXAvY2xrLXJrMzM2OC5jIGIvZHJpdmVycy9jbGsvcm9ja2NoaXAvY2xrLXJrMzM2OC5jCj4g
aW5kZXggOWM1ZDYxZS4uN2U2Yjc4MyAxMDA2NDQKPiAtLS0gYS9kcml2ZXJzL2Nsay9yb2NrY2hp
cC9jbGstcmszMzY4LmMKPiArKysgYi9kcml2ZXJzL2Nsay9yb2NrY2hpcC9jbGstcmszMzY4LmMK
PiBAQCAtODE4LDYgKzgxOCwxMCBAQCBzdGF0aWMgc3RydWN0IHJvY2tjaGlwX2Nsa19icmFuY2gg
cmszMzY4X2Nsa19icmFuY2hlc1tdIF9faW5pdGRhdGEgPSB7Cj4gIAlHQVRFKDAsICJzY2xrX3Rp
bWVyMDAiLCAieGluMjRtIiwgQ0xLX0lHTk9SRV9VTlVTRUQsIFJLMzM2OF9DTEtHQVRFX0NPTigy
NCksIDAsIEdGTEFHUyksCj4gIH07Cj4gIAo+ICtzdGF0aWMgY29uc3QgY2hhciAqY29uc3Qgcmsz
MzY4X2NyaXRpY2FsX2Nsb2Nrc1tdIF9faW5pdGNvbnN0ID0gewo+ICsJInBjbGtfcGRfcG11IiwK
PiArfTsKPiArCj4gIHN0YXRpYyB2b2lkIF9faW5pdCByazMzNjhfY2xrX2luaXQoc3RydWN0IGRl
dmljZV9ub2RlICpucCkKPiAgewo+ICAJdm9pZCBfX2lvbWVtICpyZWdfYmFzZTsKPiBAQCAtODYy
LDYgKzg2Niw4IEBAIHN0YXRpYyB2b2lkIF9faW5pdCByazMzNjhfY2xrX2luaXQoc3RydWN0IGRl
dmljZV9ub2RlICpucCkKPiAgCQkJCSAgIFJLMzM2OF9HUkZfU09DX1NUQVRVUzApOwo+ICAJcm9j
a2NoaXBfY2xrX3JlZ2lzdGVyX2JyYW5jaGVzKHJrMzM2OF9jbGtfYnJhbmNoZXMsCj4gIAkJCQkg
IEFSUkFZX1NJWkUocmszMzY4X2Nsa19icmFuY2hlcykpOwo+ICsJcm9ja2NoaXBfY2xrX3Byb3Rl
Y3RfY3JpdGljYWwocmszMzY4X2NyaXRpY2FsX2Nsb2NrcywKPiArCQkJCSAgICAgIEFSUkFZX1NJ
WkUocmszMzY4X2NyaXRpY2FsX2Nsb2NrcykpOwo+ICAKPiAgCXJvY2tjaGlwX2Nsa19yZWdpc3Rl
cl9hcm1jbGsoQVJNQ0xLQiwgImFybWNsa2IiLAo+ICAJCQltdXhfYXJtY2xrYl9wLCBBUlJBWV9T
SVpFKG11eF9hcm1jbGtiX3ApLAo+IC0tIAo+IDIuNS4xCj4gCj4gCgpfX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpsaW51eC1hcm0ta2VybmVsIG1haWxpbmcg
bGlzdApsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDovL2xpc3RzLmlu
ZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9saW51eC1hcm0ta2VybmVsCg==

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

* Re: [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-14 14:19   ` Mark Rutland
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Rutland @ 2015-09-14 14:19 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: mturquette@baylibre.com, sboyd@codeaurora.org,
	linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org

On Sun, Sep 13, 2015 at 12:20:36PM +0100, Heiko Stübner wrote:
> Again a result of the gpio-clock-liberation the rk3368 needs the
> pclk_pd_pmu marked as critical, to boot successfully.
> 
> Reported-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

FWIW: Tested-by: Mark Rutland <mark.rutland@arm.com>

I'm surprised that we don't describe these as critical in the DT, given
that this isn't really an internal property of the clock controller, but
rather what happens to be attached to it. That ship appears to have
sailed, however.

Thanks,
Mark.

> ---
> should go on top of clk-fixes. Sorry only finding these piece
> by piece :-) .
> 
>  drivers/clk/rockchip/clk-rk3368.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/clk/rockchip/clk-rk3368.c b/drivers/clk/rockchip/clk-rk3368.c
> index 9c5d61e..7e6b783 100644
> --- a/drivers/clk/rockchip/clk-rk3368.c
> +++ b/drivers/clk/rockchip/clk-rk3368.c
> @@ -818,6 +818,10 @@ static struct rockchip_clk_branch rk3368_clk_branches[] __initdata = {
>  	GATE(0, "sclk_timer00", "xin24m", CLK_IGNORE_UNUSED, RK3368_CLKGATE_CON(24), 0, GFLAGS),
>  };
>  
> +static const char *const rk3368_critical_clocks[] __initconst = {
> +	"pclk_pd_pmu",
> +};
> +
>  static void __init rk3368_clk_init(struct device_node *np)
>  {
>  	void __iomem *reg_base;
> @@ -862,6 +866,8 @@ static void __init rk3368_clk_init(struct device_node *np)
>  				   RK3368_GRF_SOC_STATUS0);
>  	rockchip_clk_register_branches(rk3368_clk_branches,
>  				  ARRAY_SIZE(rk3368_clk_branches));
> +	rockchip_clk_protect_critical(rk3368_critical_clocks,
> +				      ARRAY_SIZE(rk3368_critical_clocks));
>  
>  	rockchip_clk_register_armclk(ARMCLKB, "armclkb",
>  			mux_armclkb_p, ARRAY_SIZE(mux_armclkb_p),
> -- 
> 2.5.1
> 
> 

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

* [PATCH] clk: rockchip: add critical clock for rk3368
  2015-09-14 14:19   ` Mark Rutland
  (?)
@ 2015-09-14 15:06     ` Heiko Stübner
  -1 siblings, 0 replies; 17+ messages in thread
From: Heiko Stübner @ 2015-09-14 15:06 UTC (permalink / raw)
  To: linux-arm-kernel

Am Montag, 14. September 2015, 15:19:21 schrieb Mark Rutland:
> On Sun, Sep 13, 2015 at 12:20:36PM +0100, Heiko St?bner wrote:
> > Again a result of the gpio-clock-liberation the rk3368 needs the
> > pclk_pd_pmu marked as critical, to boot successfully.
> > 
> > Reported-by: Mark Rutland <mark.rutland@arm.com>
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> 
> FWIW: Tested-by: Mark Rutland <mark.rutland@arm.com>
> 
> I'm surprised that we don't describe these as critical in the DT, given
> that this isn't really an internal property of the clock controller, but
> rather what happens to be attached to it. That ship appears to have
> sailed, however.

I wouldn't necessarily think so ... what is called critical only means "don't 
turn off when walking the clock-tree upwards".

The pclk_pd_pmu for example simply supplies some more clocks we don't handle 
at all currently (pclk_pmu_noc, ...). That we currently choose to ignore those 
[because we don't have any code nor dt-bindings to handle the components 
supplied] sounds very much like an implementation-specific detail, not 
something about the hardware.

I really like the concept of critical clock handling Mike is working on, which 
implements some sort of hand-off and keeps so marked clocks on until a real 
components picks them up.

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

* Re: [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-14 15:06     ` Heiko Stübner
  0 siblings, 0 replies; 17+ messages in thread
From: Heiko Stübner @ 2015-09-14 15:06 UTC (permalink / raw)
  To: Mark Rutland
  Cc: mturquette@baylibre.com, sboyd@codeaurora.org,
	linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org

Am Montag, 14. September 2015, 15:19:21 schrieb Mark Rutland:
> On Sun, Sep 13, 2015 at 12:20:36PM +0100, Heiko St=FCbner wrote:
> > Again a result of the gpio-clock-liberation the rk3368 needs the
> > pclk_pd_pmu marked as critical, to boot successfully.
> >=20
> > Reported-by: Mark Rutland <mark.rutland@arm.com>
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
>=20
> FWIW: Tested-by: Mark Rutland <mark.rutland@arm.com>
>=20
> I'm surprised that we don't describe these as critical in the DT, giv=
en
> that this isn't really an internal property of the clock controller, =
but
> rather what happens to be attached to it. That ship appears to have
> sailed, however.

I wouldn't necessarily think so ... what is called critical only means =
"don't=20
turn off when walking the clock-tree upwards".

The pclk_pd_pmu for example simply supplies some more clocks we don't h=
andle=20
at all currently (pclk_pmu_noc, ...). That we currently choose to ignor=
e those=20
[because we don't have any code nor dt-bindings to handle the component=
s=20
supplied] sounds very much like an implementation-specific detail, not=20=

something about the hardware.

I really like the concept of critical clock handling Mike is working on=
, which=20
implements some sort of hand-off and keeps so marked clocks on until a =
real=20
components picks them up.

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

* Re: [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-14 15:06     ` Heiko Stübner
  0 siblings, 0 replies; 17+ messages in thread
From: Heiko Stübner @ 2015-09-14 15:06 UTC (permalink / raw)
  To: Mark Rutland
  Cc: mturquette@baylibre.com, sboyd@codeaurora.org,
	linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org

Am Montag, 14. September 2015, 15:19:21 schrieb Mark Rutland:
> On Sun, Sep 13, 2015 at 12:20:36PM +0100, Heiko Stübner wrote:
> > Again a result of the gpio-clock-liberation the rk3368 needs the
> > pclk_pd_pmu marked as critical, to boot successfully.
> > 
> > Reported-by: Mark Rutland <mark.rutland@arm.com>
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> 
> FWIW: Tested-by: Mark Rutland <mark.rutland@arm.com>
> 
> I'm surprised that we don't describe these as critical in the DT, given
> that this isn't really an internal property of the clock controller, but
> rather what happens to be attached to it. That ship appears to have
> sailed, however.

I wouldn't necessarily think so ... what is called critical only means "don't 
turn off when walking the clock-tree upwards".

The pclk_pd_pmu for example simply supplies some more clocks we don't handle 
at all currently (pclk_pmu_noc, ...). That we currently choose to ignore those 
[because we don't have any code nor dt-bindings to handle the components 
supplied] sounds very much like an implementation-specific detail, not 
something about the hardware.

I really like the concept of critical clock handling Mike is working on, which 
implements some sort of hand-off and keeps so marked clocks on until a real 
components picks them up.

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

* [PATCH] clk: rockchip: add critical clock for rk3368
  2015-09-14 15:06     ` Heiko Stübner
@ 2015-09-14 15:19       ` Mark Rutland
  -1 siblings, 0 replies; 17+ messages in thread
From: Mark Rutland @ 2015-09-14 15:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 14, 2015 at 04:06:05PM +0100, Heiko St?bner wrote:
> Am Montag, 14. September 2015, 15:19:21 schrieb Mark Rutland:
> > On Sun, Sep 13, 2015 at 12:20:36PM +0100, Heiko St?bner wrote:
> > > Again a result of the gpio-clock-liberation the rk3368 needs the
> > > pclk_pd_pmu marked as critical, to boot successfully.
> > > 
> > > Reported-by: Mark Rutland <mark.rutland@arm.com>
> > > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > 
> > FWIW: Tested-by: Mark Rutland <mark.rutland@arm.com>
> > 
> > I'm surprised that we don't describe these as critical in the DT, given
> > that this isn't really an internal property of the clock controller, but
> > rather what happens to be attached to it. That ship appears to have
> > sailed, however.
> 
> I wouldn't necessarily think so ... what is called critical only means "don't 
> turn off when walking the clock-tree upwards".
> 
> The pclk_pd_pmu for example simply supplies some more clocks we don't handle 
> at all currently (pclk_pmu_noc, ...). That we currently choose to ignore those 
> [because we don't have any code nor dt-bindings to handle the components 
> supplied] sounds very much like an implementation-specific detail, not 
> something about the hardware.

Sure, but the specific case that lead to this report was the fact that
this clock (directly?) feeds the pinctrl programming interface, and that
fact is neither described in the DT nor handled by the driver. Surely
that should be described and handled?

Thanks,
Mark.

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

* Re: [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-14 15:19       ` Mark Rutland
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Rutland @ 2015-09-14 15:19 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: mturquette@baylibre.com, sboyd@codeaurora.org,
	linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org

On Mon, Sep 14, 2015 at 04:06:05PM +0100, Heiko Stübner wrote:
> Am Montag, 14. September 2015, 15:19:21 schrieb Mark Rutland:
> > On Sun, Sep 13, 2015 at 12:20:36PM +0100, Heiko Stübner wrote:
> > > Again a result of the gpio-clock-liberation the rk3368 needs the
> > > pclk_pd_pmu marked as critical, to boot successfully.
> > > 
> > > Reported-by: Mark Rutland <mark.rutland@arm.com>
> > > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > 
> > FWIW: Tested-by: Mark Rutland <mark.rutland@arm.com>
> > 
> > I'm surprised that we don't describe these as critical in the DT, given
> > that this isn't really an internal property of the clock controller, but
> > rather what happens to be attached to it. That ship appears to have
> > sailed, however.
> 
> I wouldn't necessarily think so ... what is called critical only means "don't 
> turn off when walking the clock-tree upwards".
> 
> The pclk_pd_pmu for example simply supplies some more clocks we don't handle 
> at all currently (pclk_pmu_noc, ...). That we currently choose to ignore those 
> [because we don't have any code nor dt-bindings to handle the components 
> supplied] sounds very much like an implementation-specific detail, not 
> something about the hardware.

Sure, but the specific case that lead to this report was the fact that
this clock (directly?) feeds the pinctrl programming interface, and that
fact is neither described in the DT nor handled by the driver. Surely
that should be described and handled?

Thanks,
Mark.

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

* [PATCH] clk: rockchip: add critical clock for rk3368
  2015-09-14 15:19       ` Mark Rutland
  (?)
@ 2015-09-14 15:24         ` Heiko Stübner
  -1 siblings, 0 replies; 17+ messages in thread
From: Heiko Stübner @ 2015-09-14 15:24 UTC (permalink / raw)
  To: linux-arm-kernel

Am Montag, 14. September 2015, 16:19:42 schrieb Mark Rutland:
> On Mon, Sep 14, 2015 at 04:06:05PM +0100, Heiko St?bner wrote:
> > Am Montag, 14. September 2015, 15:19:21 schrieb Mark Rutland:
> > > On Sun, Sep 13, 2015 at 12:20:36PM +0100, Heiko St?bner wrote:
> > > > Again a result of the gpio-clock-liberation the rk3368 needs the
> > > > pclk_pd_pmu marked as critical, to boot successfully.
> > > > 
> > > > Reported-by: Mark Rutland <mark.rutland@arm.com>
> > > > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > > 
> > > FWIW: Tested-by: Mark Rutland <mark.rutland@arm.com>
> > > 
> > > I'm surprised that we don't describe these as critical in the DT, given
> > > that this isn't really an internal property of the clock controller, but
> > > rather what happens to be attached to it. That ship appears to have
> > > sailed, however.
> > 
> > I wouldn't necessarily think so ... what is called critical only means
> > "don't turn off when walking the clock-tree upwards".
> > 
> > The pclk_pd_pmu for example simply supplies some more clocks we don't
> > handle at all currently (pclk_pmu_noc, ...). That we currently choose to
> > ignore those [because we don't have any code nor dt-bindings to handle
> > the components supplied] sounds very much like an implementation-specific
> > detail, not something about the hardware.
> 
> Sure, but the specific case that lead to this report was the fact that
> this clock (directly?) feeds the pinctrl programming interface, and that
> fact is neither described in the DT nor handled by the driver. Surely
> that should be described and handled?

nope it doesn't :-) pclk_pd_pmu feeds pclk_gpio0.

Before the pinctrl patch, pclk_gpio0 was just statically on all the time, now 
it gets turned off when bank0 is not in use (between reads/writes and if no 
interrupts are enabled). This in turn makes the clock framework turn off 
pclk_pd_pmu (and thus its other unhandled child-clocks).

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

* Re: [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-14 15:24         ` Heiko Stübner
  0 siblings, 0 replies; 17+ messages in thread
From: Heiko Stübner @ 2015-09-14 15:24 UTC (permalink / raw)
  To: Mark Rutland
  Cc: mturquette@baylibre.com, sboyd@codeaurora.org,
	linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org

Am Montag, 14. September 2015, 16:19:42 schrieb Mark Rutland:
> On Mon, Sep 14, 2015 at 04:06:05PM +0100, Heiko St=FCbner wrote:
> > Am Montag, 14. September 2015, 15:19:21 schrieb Mark Rutland:
> > > On Sun, Sep 13, 2015 at 12:20:36PM +0100, Heiko St=FCbner wrote:
> > > > Again a result of the gpio-clock-liberation the rk3368 needs th=
e
> > > > pclk_pd_pmu marked as critical, to boot successfully.
> > > >=20
> > > > Reported-by: Mark Rutland <mark.rutland@arm.com>
> > > > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > >=20
> > > FWIW: Tested-by: Mark Rutland <mark.rutland@arm.com>
> > >=20
> > > I'm surprised that we don't describe these as critical in the DT,=
 given
> > > that this isn't really an internal property of the clock controll=
er, but
> > > rather what happens to be attached to it. That ship appears to ha=
ve
> > > sailed, however.
> >=20
> > I wouldn't necessarily think so ... what is called critical only me=
ans
> > "don't turn off when walking the clock-tree upwards".
> >=20
> > The pclk_pd_pmu for example simply supplies some more clocks we don=
't
> > handle at all currently (pclk_pmu_noc, ...). That we currently choo=
se to
> > ignore those [because we don't have any code nor dt-bindings to han=
dle
> > the components supplied] sounds very much like an implementation-sp=
ecific
> > detail, not something about the hardware.
>=20
> Sure, but the specific case that lead to this report was the fact tha=
t
> this clock (directly?) feeds the pinctrl programming interface, and t=
hat
> fact is neither described in the DT nor handled by the driver. Surely=

> that should be described and handled?

nope it doesn't :-) pclk_pd_pmu feeds pclk_gpio0.

Before the pinctrl patch, pclk_gpio0 was just statically on all the tim=
e, now=20
it gets turned off when bank0 is not in use (between reads/writes and i=
f no=20
interrupts are enabled). This in turn makes the clock framework turn of=
f=20
pclk_pd_pmu (and thus its other unhandled child-clocks).

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

* Re: [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-14 15:24         ` Heiko Stübner
  0 siblings, 0 replies; 17+ messages in thread
From: Heiko Stübner @ 2015-09-14 15:24 UTC (permalink / raw)
  To: Mark Rutland
  Cc: mturquette@baylibre.com, sboyd@codeaurora.org,
	linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org

Am Montag, 14. September 2015, 16:19:42 schrieb Mark Rutland:
> On Mon, Sep 14, 2015 at 04:06:05PM +0100, Heiko Stübner wrote:
> > Am Montag, 14. September 2015, 15:19:21 schrieb Mark Rutland:
> > > On Sun, Sep 13, 2015 at 12:20:36PM +0100, Heiko Stübner wrote:
> > > > Again a result of the gpio-clock-liberation the rk3368 needs the
> > > > pclk_pd_pmu marked as critical, to boot successfully.
> > > > 
> > > > Reported-by: Mark Rutland <mark.rutland@arm.com>
> > > > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > > 
> > > FWIW: Tested-by: Mark Rutland <mark.rutland@arm.com>
> > > 
> > > I'm surprised that we don't describe these as critical in the DT, given
> > > that this isn't really an internal property of the clock controller, but
> > > rather what happens to be attached to it. That ship appears to have
> > > sailed, however.
> > 
> > I wouldn't necessarily think so ... what is called critical only means
> > "don't turn off when walking the clock-tree upwards".
> > 
> > The pclk_pd_pmu for example simply supplies some more clocks we don't
> > handle at all currently (pclk_pmu_noc, ...). That we currently choose to
> > ignore those [because we don't have any code nor dt-bindings to handle
> > the components supplied] sounds very much like an implementation-specific
> > detail, not something about the hardware.
> 
> Sure, but the specific case that lead to this report was the fact that
> this clock (directly?) feeds the pinctrl programming interface, and that
> fact is neither described in the DT nor handled by the driver. Surely
> that should be described and handled?

nope it doesn't :-) pclk_pd_pmu feeds pclk_gpio0.

Before the pinctrl patch, pclk_gpio0 was just statically on all the time, now 
it gets turned off when bank0 is not in use (between reads/writes and if no 
interrupts are enabled). This in turn makes the clock framework turn off 
pclk_pd_pmu (and thus its other unhandled child-clocks).

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

* [PATCH] clk: rockchip: add critical clock for rk3368
  2015-09-13 11:20 ` Heiko Stübner
  (?)
@ 2015-09-14 19:49   ` Stephen Boyd
  -1 siblings, 0 replies; 17+ messages in thread
From: Stephen Boyd @ 2015-09-14 19:49 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/13, Heiko St?bner wrote:
> Again a result of the gpio-clock-liberation the rk3368 needs the
> pclk_pd_pmu marked as critical, to boot successfully.
> 
> Reported-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---

Applied to clk-fixes

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* Re: [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-14 19:49   ` Stephen Boyd
  0 siblings, 0 replies; 17+ messages in thread
From: Stephen Boyd @ 2015-09-14 19:49 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: Mark Rutland, linux-rockchip, mturquette, linux-clk,
	linux-arm-kernel

On 09/13, Heiko St=FCbner wrote:
> Again a result of the gpio-clock-liberation the rk3368 needs the
> pclk_pd_pmu marked as critical, to boot successfully.
> =

> Reported-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---

Applied to clk-fixes

-- =

Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] clk: rockchip: add critical clock for rk3368
@ 2015-09-14 19:49   ` Stephen Boyd
  0 siblings, 0 replies; 17+ messages in thread
From: Stephen Boyd @ 2015-09-14 19:49 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: mturquette, linux-clk, linux-rockchip, linux-arm-kernel,
	Mark Rutland

On 09/13, Heiko Stübner wrote:
> Again a result of the gpio-clock-liberation the rk3368 needs the
> pclk_pd_pmu marked as critical, to boot successfully.
> 
> Reported-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---

Applied to clk-fixes

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

end of thread, other threads:[~2015-09-14 19:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-13 11:20 [PATCH] clk: rockchip: add critical clock for rk3368 Heiko Stübner
2015-09-13 11:20 ` Heiko Stübner
2015-09-13 11:20 ` Heiko Stübner
2015-09-14 14:19 ` Mark Rutland
2015-09-14 14:19   ` Mark Rutland
2015-09-14 14:19   ` Mark Rutland
2015-09-14 15:06   ` Heiko Stübner
2015-09-14 15:06     ` Heiko Stübner
2015-09-14 15:06     ` Heiko Stübner
2015-09-14 15:19     ` Mark Rutland
2015-09-14 15:19       ` Mark Rutland
2015-09-14 15:24       ` Heiko Stübner
2015-09-14 15:24         ` Heiko Stübner
2015-09-14 15:24         ` Heiko Stübner
2015-09-14 19:49 ` Stephen Boyd
2015-09-14 19:49   ` Stephen Boyd
2015-09-14 19:49   ` Stephen Boyd

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.